| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Api.Typed
Contents
- Eras
- Type tags
- Cryptographic key interface
- Payment addresses
- Stake addresses
- Currency values
- Building transactions
- Signing transactions
- Fee calculation
- Transaction metadata
- Registering stake address and delegating
- Registering stake pools
- Scripts
- Serialisation
- Errors
- Node interaction
- Node operation
- Genesis file
- Special transactions
Description
This module provides a library interface for interacting with Cardano as a user of the system.
It is intended to be used to write tools and
In the interest of simplicity it glosses over some details of the system. Most simple tools should be able to work just using this interface, however you can go deeper and expose the types from the underlying libraries using Cardano.Api.Byron or Cardano.Api.Shelley.
Synopsis
- data ByronEra
- data ShelleyEra
- data AllegraEra
- data MaryEra
- data CardanoEra era where
- class HasTypeProxy era ⇒ IsCardanoEra era where
- cardanoEra ∷ CardanoEra era
- data AnyCardanoEra where
- AnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → AnyCardanoEra
- anyCardanoEra ∷ CardanoEra era → AnyCardanoEra
- data InAnyCardanoEra thing where
- InAnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → thing era → InAnyCardanoEra thing
- data ShelleyBasedEra era where
- class (IsCardanoEra era, Crypto (ShelleyLedgerEra era) ~ StandardCrypto) ⇒ IsShelleyBasedEra era where
- data InAnyShelleyBasedEra thing where
- InAnyShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → thing era → InAnyShelleyBasedEra thing
- type family ShelleyLedgerEra era where ...
- data CardanoEraStyle era where
- LegacyByronEra ∷ CardanoEraStyle ByronEra
- ShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → CardanoEraStyle era
- cardanoEraStyle ∷ CardanoEra era → CardanoEraStyle era
- type Byron = ByronEra
- type Shelley = ShelleyEra
- type Allegra = AllegraEra
- type Mary = MaryEra
- class HasTypeProxy t where
- data AsType t
- proxyToAsType ∷ Proxy t → AsType t
- class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole
- getVerificationKey ∷ Key keyrole ⇒ SigningKey keyrole → VerificationKey keyrole
- verificationKeyHash ∷ Key keyrole ⇒ VerificationKey keyrole → Hash keyrole
- castVerificationKey ∷ CastVerificationKeyRole keyroleA keyroleB ⇒ VerificationKey keyroleA → VerificationKey keyroleB
- castSigningKey ∷ CastSigningKeyRole keyroleA keyroleB ⇒ SigningKey keyroleA → SigningKey keyroleB
- generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole)
- deterministicSigningKey ∷ Key keyrole ⇒ AsType keyrole → Seed → SigningKey keyrole
- deterministicSigningKeySeedSize ∷ Key keyrole ⇒ AsType keyrole → Word
- data Seed
- mkSeedFromBytes ∷ ByteString → Seed
- readSeedFromSystemEntropy ∷ Word → IO Seed
- data family Hash keyrole ∷ Type
- castHash ∷ CastHash roleA roleB ⇒ Hash roleA → Hash roleB
- data Address addrtype where
- ByronAddress ∷ Address → Address ByronAddr
- ShelleyAddress ∷ Network → PaymentCredential StandardCrypto → StakeReference StandardCrypto → Address ShelleyAddr
- data ByronAddr
- data ShelleyAddr
- data NetworkId
- makeByronAddress ∷ NetworkId → VerificationKey ByronKey → Address ByronAddr
- data ByronKey
- data ByronKeyLegacy
- makeShelleyAddress ∷ NetworkId → PaymentCredential → StakeAddressReference → Address ShelleyAddr
- data PaymentCredential
- data StakeAddressReference
- = StakeAddressByValue StakeCredential
- | StakeAddressByPointer StakeAddressPointer
- | NoStakeAddress
- data PaymentKey
- data PaymentExtendedKey
- data AddressAny
- data AddressInEra era where
- AddressInEra ∷ AddressTypeInEra addrtype era → Address addrtype → AddressInEra era
- data AddressTypeInEra addrtype era where
- byronAddressInEra ∷ Address ByronAddr → AddressInEra era
- shelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ Address ShelleyAddr → AddressInEra era
- anyAddressInShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ AddressAny → AddressInEra era
- anyAddressInEra ∷ CardanoEra era → AddressAny → Maybe (AddressInEra era)
- toAddressAny ∷ Address addr → AddressAny
- makeByronAddressInEra ∷ NetworkId → VerificationKey ByronKey → AddressInEra era
- makeShelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ NetworkId → PaymentCredential → StakeAddressReference → AddressInEra era
- data StakeAddress where
- StakeAddress ∷ Network → StakeCredential StandardCrypto → StakeAddress
- data StakeCredential
- makeStakeAddress ∷ NetworkId → StakeCredential → StakeAddress
- data StakeKey
- data StakeExtendedKey
- newtype Lovelace = Lovelace Integer
- newtype Quantity = Quantity Integer
- newtype PolicyId = PolicyId ScriptHash
- newtype AssetName = AssetName ByteString
- data AssetId
- data Value
- selectAsset ∷ Value → AssetId → Quantity
- valueFromList ∷ [(AssetId, Quantity)] → Value
- valueToList ∷ Value → [(AssetId, Quantity)]
- filterValue ∷ (AssetId → Bool) → Value → Value
- negateValue ∷ Value → Value
- quantityToLovelace ∷ Quantity → Lovelace
- lovelaceToQuantity ∷ Lovelace → Quantity
- selectLovelace ∷ Value → Lovelace
- lovelaceToValue ∷ Lovelace → Value
- valueToLovelace ∷ Value → Maybe Lovelace
- newtype ValueNestedRep = ValueNestedRep [ValueNestedBundle]
- data ValueNestedBundle
- valueToNestedRep ∷ Value → ValueNestedRep
- valueFromNestedRep ∷ ValueNestedRep → Value
- data TxBody era where
- ByronTxBody ∷ Annotated Tx ByteString → TxBody ByronEra
- ShelleyTxBody ∷ ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → Maybe (AuxiliaryData (ShelleyLedgerEra era)) → TxBody era
- makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent era → Either (TxBodyError era) (TxBody era)
- data TxBodyContent era = TxBodyContent {
- txIns ∷ [TxIn]
- txOuts ∷ [TxOut era]
- txFee ∷ TxFee era
- txValidityRange ∷ (TxValidityLowerBound era, TxValidityUpperBound era)
- txMetadata ∷ TxMetadataInEra era
- txAuxScripts ∷ TxAuxScripts era
- txWithdrawals ∷ TxWithdrawals era
- txCertificates ∷ TxCertificates era
- txUpdateProposal ∷ TxUpdateProposal era
- txMintValue ∷ TxMintValue era
- data TxBodyError era
- makeByronTransaction ∷ [TxIn] → [TxOut ByronEra] → Either (TxBodyError ByronEra) (TxBody ByronEra)
- makeShelleyTransaction ∷ [TxIn] → [TxOut ShelleyEra] → SlotNo → Lovelace → [Certificate] → [(StakeAddress, Lovelace)] → Maybe TxMetadata → Maybe UpdateProposal → Either (TxBodyError ShelleyEra) (TxBody ShelleyEra)
- newtype TxId = TxId (Hash StandardCrypto EraIndependentTxBody)
- getTxId ∷ TxBody era → TxId
- data TxIn = TxIn TxId TxIx
- newtype TxIx = TxIx Word
- data TxOut era = TxOut (AddressInEra era) (TxOutValue era)
- data TxOutValue era where
- TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era
- TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era
- data TxFee era where
- TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era
- TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era
- data TxValidityLowerBound era where
- data TxValidityUpperBound era where
- newtype SlotNo = SlotNo {}
- data TxMetadataInEra era where
- TxMetadataNone ∷ TxMetadataInEra era
- TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era
- data TxAuxScripts era where
- TxAuxScriptsNone ∷ TxAuxScripts era
- TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era
- data TxWithdrawals era where
- TxWithdrawalsNone ∷ TxWithdrawals era
- TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace)] → TxWithdrawals era
- data TxCertificates era where
- TxCertificatesNone ∷ TxCertificates era
- TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → TxCertificates era
- data Certificate
- = StakeAddressRegistrationCertificate StakeCredential
- | StakeAddressDeregistrationCertificate StakeCredential
- | StakeAddressDelegationCertificate StakeCredential PoolId
- | StakePoolRegistrationCertificate StakePoolParameters
- | StakePoolRetirementCertificate PoolId EpochNo
- | GenesisKeyDelegationCertificate (Hash GenesisKey) (Hash GenesisDelegateKey) (Hash VrfKey)
- | MIRCertificate MIRPot [(StakeCredential, Lovelace)]
- toShelleyCertificate ∷ Certificate → DCert StandardCrypto
- fromShelleyCertificate ∷ DCert StandardCrypto → Certificate
- data TxUpdateProposal era where
- data TxMintValue era where
- TxMintNone ∷ TxMintValue era
- TxMintValue ∷ MultiAssetSupportedInEra era → Value → TxMintValue era
- data MultiAssetSupportedInEra era where
- data OnlyAdaSupportedInEra era where
- data TxFeesExplicitInEra era where
- data TxFeesImplicitInEra era where
- data ValidityUpperBoundSupportedInEra era where
- data ValidityNoUpperBoundSupportedInEra era where
- data ValidityLowerBoundSupportedInEra era where
- data TxMetadataSupportedInEra era where
- data AuxScriptsSupportedInEra era where
- data WithdrawalsSupportedInEra era where
- data CertificatesSupportedInEra era where
- data UpdateProposalSupportedInEra era where
- multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era)
- txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era)
- validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era)
- validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era)
- validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era)
- txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era)
- auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era)
- withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era)
- certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era)
- updateProposalSupportedInEra ∷ CardanoEra era → Maybe (UpdateProposalSupportedInEra era)
- data Tx era where
- ByronTx ∷ ATxAux ByteString → Tx ByronEra
- ShelleyTx ∷ ShelleyBasedEra era → Tx (ShelleyLedgerEra era) → Tx era
- pattern Tx ∷ TxBody era → [Witness era] → Tx era
- getTxBody ∷ ∀ era. Tx era → TxBody era
- getTxWitnesses ∷ ∀ era. Tx era → [Witness era]
- data ShelleySigningKey
- toShelleySigningKey ∷ ShelleyWitnessSigningKey → ShelleySigningKey
- signByronTransaction ∷ NetworkId → TxBody ByronEra → [SigningKey ByronKey] → Tx ByronEra
- signShelleyTransaction ∷ IsShelleyBasedEra era ⇒ TxBody era → [ShelleyWitnessSigningKey] → Tx era
- makeSignedTransaction ∷ ∀ era. [Witness era] → TxBody era → Tx era
- data Witness era where
- ByronKeyWitness ∷ TxInWitness → Witness ByronEra
- ShelleyBootstrapWitness ∷ ShelleyBasedEra era → BootstrapWitness StandardCrypto → Witness era
- ShelleyKeyWitness ∷ ShelleyBasedEra era → WitVKey Witness StandardCrypto → Witness era
- ShelleyScriptWitness ∷ ShelleyBasedEra era → Script (ShelleyLedgerEra era) → Witness era
- makeByronKeyWitness ∷ ∀ key. IsByronKey key ⇒ NetworkId → TxBody ByronEra → SigningKey key → Witness ByronEra
- data ShelleyWitnessSigningKey
- = WitnessPaymentKey (SigningKey PaymentKey)
- | WitnessPaymentExtendedKey (SigningKey PaymentExtendedKey)
- | WitnessStakeKey (SigningKey StakeKey)
- | WitnessStakeExtendedKey (SigningKey StakeExtendedKey)
- | WitnessStakePoolKey (SigningKey StakePoolKey)
- | WitnessGenesisKey (SigningKey GenesisKey)
- | WitnessGenesisExtendedKey (SigningKey GenesisExtendedKey)
- | WitnessGenesisDelegateKey (SigningKey GenesisDelegateKey)
- | WitnessGenesisDelegateExtendedKey (SigningKey GenesisDelegateExtendedKey)
- | WitnessGenesisUTxOKey (SigningKey GenesisUTxOKey)
- makeShelleyKeyWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ TxBody era → ShelleyWitnessSigningKey → Witness era
- data WitnessNetworkIdOrByronAddress
- makeShelleyBootstrapWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ WitnessNetworkIdOrByronAddress → TxBody era → SigningKey ByronKey → Witness era
- makeScriptWitness ∷ ∀ era. ScriptInEra era → Witness era
- makeShelleySignature ∷ SignableRepresentation tosign ⇒ tosign → ShelleySigningKey → SignedDSIGN StandardCrypto tosign
- getShelleyKeyWitnessVerificationKey ∷ ShelleySigningKey → VKey Witness StandardCrypto
- transactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ Natural → Natural → Tx era → Lovelace
- estimateTransactionFee ∷ ∀ era. IsShelleyBasedEra era ⇒ NetworkId → Natural → Natural → Tx era → Int → Int → Int → Int → Lovelace
- newtype TxMetadata = TxMetadata (Map Word64 TxMetadataValue)
- toShelleyMetadata ∷ Map Word64 TxMetadataValue → Map Word64 Metadatum
- fromShelleyMetadata ∷ Map Word64 Metadatum → Map Word64 TxMetadataValue
- data TxMetadataValue
- makeTransactionMetadata ∷ Map Word64 TxMetadataValue → TxMetadata
- validateTxMetadata ∷ TxMetadata → Either [(Word64, TxMetadataRangeError)] ()
- data TxMetadataRangeError
- data TxMetadataJsonSchema
- metadataFromJson ∷ TxMetadataJsonSchema → Value → Either TxMetadataJsonError TxMetadata
- metadataToJson ∷ TxMetadataJsonSchema → TxMetadata → Value
- metadataValueToJsonNoSchema ∷ TxMetadataValue → Value
- data TxMetadataJsonError
- data TxMetadataJsonSchemaError
- = TxMetadataJsonNullNotAllowed
- | TxMetadataJsonBoolNotAllowed
- | TxMetadataJsonNumberNotInteger !Double
- | TxMetadataJsonNotObject !Value
- | TxMetadataJsonBadObject ![(Text, Value)]
- | TxMetadataJsonBadMapPair !Value
- | TxMetadataJsonTypeMismatch !Text !Value
- makeStakeAddressRegistrationCertificate ∷ StakeCredential → Certificate
- makeStakeAddressDeregistrationCertificate ∷ StakeCredential → Certificate
- makeStakeAddressDelegationCertificate ∷ StakeCredential → PoolId → Certificate
- makeStakePoolRegistrationCertificate ∷ StakePoolParameters → Certificate
- makeStakePoolRetirementCertificate ∷ PoolId → EpochNo → Certificate
- data StakePoolParameters = StakePoolParameters {}
- data StakePoolRelay
- = StakePoolRelayIp (Maybe IPv4) (Maybe IPv6) (Maybe PortNumber)
- | StakePoolRelayDnsARecord ByteString (Maybe PortNumber)
- | StakePoolRelayDnsSrvRecord ByteString
- data StakePoolMetadataReference = StakePoolMetadataReference {}
- data StakePoolMetadata = StakePoolMetadata {}
- validateAndHashStakePoolMetadata ∷ ByteString → Either StakePoolMetadataValidationError (StakePoolMetadata, Hash StakePoolMetadata)
- data StakePoolMetadataValidationError
- data SimpleScriptV1
- data SimpleScriptV2
- data ScriptLanguage lang where
- SimpleScriptLanguage ∷ SimpleScriptVersion lang → ScriptLanguage lang
- PlutusScriptLanguage ∷ PlutusScriptVersion lang → ScriptLanguage lang
- data SimpleScriptVersion lang where
- data PlutusScriptVersion lang
- data AnyScriptLanguage where
- class HasTypeProxy lang ⇒ IsScriptLanguage lang where
- scriptLanguage ∷ ScriptLanguage lang
- class IsScriptLanguage lang ⇒ IsSimpleScriptLanguage lang where
- data Script lang where
- SimpleScript ∷ !(SimpleScriptVersion lang) → !(SimpleScript lang) → Script lang
- PlutusScript ∷ !(PlutusScriptVersion lang) → () → Script lang
- data ScriptInAnyLang where
- ScriptInAnyLang ∷ ScriptLanguage lang → Script lang → ScriptInAnyLang
- toScriptInAnyLang ∷ Script lang → ScriptInAnyLang
- data ScriptInEra era where
- ScriptInEra ∷ ScriptLanguageInEra lang era → Script lang → ScriptInEra era
- toScriptInEra ∷ CardanoEra era → ScriptInAnyLang → Maybe (ScriptInEra era)
- eraOfScriptInEra ∷ ScriptInEra era → ShelleyBasedEra era
- data ScriptLanguageInEra lang era where
- SimpleScriptV1InShelley ∷ ScriptLanguageInEra SimpleScriptV1 ShelleyEra
- SimpleScriptV1InAllegra ∷ ScriptLanguageInEra SimpleScriptV1 AllegraEra
- SimpleScriptV1InMary ∷ ScriptLanguageInEra SimpleScriptV1 MaryEra
- SimpleScriptV2InAllegra ∷ ScriptLanguageInEra SimpleScriptV2 AllegraEra
- SimpleScriptV2InMary ∷ ScriptLanguageInEra SimpleScriptV2 MaryEra
- scriptLanguageSupportedInEra ∷ CardanoEra era → ScriptLanguage lang → Maybe (ScriptLanguageInEra lang era)
- languageOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ScriptLanguage lang
- eraOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ShelleyBasedEra era
- data SimpleScript lang where
- RequireSignature ∷ !(Hash PaymentKey) → SimpleScript lang
- RequireTimeBefore ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang
- RequireTimeAfter ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang
- RequireAllOf ∷ [SimpleScript lang] → SimpleScript lang
- RequireAnyOf ∷ [SimpleScript lang] → SimpleScript lang
- RequireMOf ∷ Int → [SimpleScript lang] → SimpleScript lang
- data TimeLocksSupported lang where
- timeLocksSupported ∷ SimpleScriptVersion lang → Maybe (TimeLocksSupported lang)
- adjustSimpleScriptVersion ∷ SimpleScriptVersion lang' → SimpleScript lang → Maybe (SimpleScript lang')
- data ScriptHash
- hashScript ∷ Script lang → ScriptHash
- toShelleyScript ∷ ScriptInEra era → Script (ShelleyLedgerEra era)
- toShelleyMultiSig ∷ SimpleScript SimpleScriptV1 → MultiSig StandardCrypto
- fromShelleyMultiSig ∷ MultiSig StandardCrypto → SimpleScript lang
- toAllegraTimelock ∷ ∀ lang. SimpleScript lang → Timelock StandardCrypto
- fromAllegraTimelock ∷ TimeLocksSupported lang → Timelock StandardCrypto → SimpleScript lang
- toShelleyScriptHash ∷ ScriptHash → ScriptHash StandardCrypto
- fromShelleyScriptHash ∷ ScriptHash StandardCrypto → ScriptHash
- class HasTypeProxy a ⇒ SerialiseAsCBOR a
- class Typeable a ⇒ ToCBOR a
- class Typeable a ⇒ FromCBOR a
- serialiseToCBOR ∷ SerialiseAsCBOR a ⇒ a → ByteString
- deserialiseFromCBOR ∷ SerialiseAsCBOR a ⇒ AsType a → ByteString → Either DecoderError a
- class ToJSON a
- class FromJSON a
- serialiseToJSON ∷ ToJSON a ⇒ a → ByteString
- deserialiseFromJSON ∷ FromJSON a ⇒ AsType a → ByteString → Either JsonDecodeError a
- newtype JsonDecodeError = JsonDecodeError String
- readFileJSON ∷ FromJSON a ⇒ AsType a → FilePath → IO (Either (FileError JsonDecodeError) a)
- writeFileJSON ∷ ToJSON a ⇒ FilePath → a → IO (Either (FileError ()) ())
- class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a
- serialiseToBech32 ∷ SerialiseAsBech32 a ⇒ a → Text
- deserialiseFromBech32 ∷ SerialiseAsBech32 a ⇒ AsType a → Text → Either Bech32DecodeError a
- deserialiseAnyOfFromBech32 ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → Text → Either Bech32DecodeError b
- data Bech32DecodeError
- = Bech32DecodingError !DecodingError
- | Bech32UnexpectedPrefix !Text !(Set Text)
- | Bech32DataPartToBytesError !Text
- | Bech32DeserialiseFromBytesError !ByteString
- | Bech32WrongPrefix !Text !Text
- class HasTypeProxy addr ⇒ SerialiseAddress addr
- serialiseAddress ∷ SerialiseAddress addr ⇒ addr → Text
- deserialiseAddress ∷ SerialiseAddress addr ⇒ AsType addr → Text → Maybe addr
- class HasTypeProxy a ⇒ SerialiseAsRawBytes a
- serialiseToRawBytes ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- deserialiseFromRawBytes ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- serialiseToRawBytesHex ∷ SerialiseAsRawBytes a ⇒ a → ByteString
- deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a
- class SerialiseAsCBOR a ⇒ HasTextEnvelope a where
- data TextEnvelope = TextEnvelope {}
- data TextEnvelopeType
- data TextEnvelopeDescr
- textEnvelopeRawCBOR ∷ TextEnvelope → ByteString
- serialiseToTextEnvelope ∷ ∀ a. HasTextEnvelope a ⇒ Maybe TextEnvelopeDescr → a → TextEnvelope
- deserialiseFromTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → TextEnvelope → Either TextEnvelopeError a
- data TextEnvelopeError
- = TextEnvelopeTypeError ![TextEnvelopeType] !TextEnvelopeType
- | TextEnvelopeDecodeError !DecoderError
- | TextEnvelopeAesonDecodeError !String
- readFileTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → FilePath → IO (Either (FileError TextEnvelopeError) a)
- writeFileTextEnvelope ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ())
- writeFileTextEnvelopeWithOwnerPermissions ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ())
- readTextEnvelopeFromFile ∷ FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope)
- readTextEnvelopeOfTypeFromFile ∷ TextEnvelopeType → FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope)
- data FromSomeType (c ∷ Type → Constraint) b where
- FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b
- deserialiseFromTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → TextEnvelope → Either TextEnvelopeError b
- readFileTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → FilePath → IO (Either (FileError TextEnvelopeError) b)
- class Show e ⇒ Error e where
- displayError ∷ e → String
- throwErrorAsException ∷ Error e ⇒ e → IO a
- data FileError e
- connectToLocalNode ∷ ∀ mode block. (ShowProxy block, ShowProxy (ApplyTxErr block), ShowProxy (Query block), ShowProxy (GenTx block), ShowQuery (Query block)) ⇒ LocalNodeConnectInfo mode block → LocalNodeClientProtocols block → IO ()
- data LocalNodeConnectInfo mode block = LocalNodeConnectInfo {}
- data ByronMode
- data ShelleyMode
- data CardanoMode
- data NodeConsensusMode mode block where
- ByronMode ∷ EpochSlots → NodeConsensusMode ByronMode ByronBlockHFC
- ShelleyMode ∷ NodeConsensusMode ShelleyMode (ShelleyBlockHFC StandardShelley)
- CardanoMode ∷ EpochSlots → NodeConsensusMode CardanoMode (CardanoBlock StandardCrypto)
- data LocalNodeClientProtocols block = LocalNodeClientProtocols {
- localChainSyncClient ∷ Maybe (ChainSyncClient block (Point block) (Tip block) IO ())
- localTxSubmissionClient ∷ Maybe (LocalTxSubmissionClient (GenTx block) (ApplyTxErr block) IO ())
- localStateQueryClient ∷ Maybe (LocalStateQueryClient block (Point block) (Query block) IO ())
- nullLocalNodeClientProtocols ∷ LocalNodeClientProtocols block
- withNodeProtocolClient ∷ NodeConsensusMode mode block → ((SerialiseNodeToClientConstraints block, SupportedNetworkProtocolVersion block) ⇒ ProtocolClient block (BlockProtocol block) → a) → a
- newtype ChainSyncClient header point tip (m ∷ Type → Type) a = ChainSyncClient {
- runChainSyncClient ∷ m (ClientStIdle header point tip m a)
- newtype LocalTxSubmissionClient tx reject (m ∷ Type → Type) a = LocalTxSubmissionClient {
- runLocalTxSubmissionClient ∷ m (LocalTxClientStIdle tx reject m a)
- submitTxToNodeLocal ∷ ∀ mode block. (ShowProxy block, ShowProxy (ApplyTxErr block), ShowProxy (Query block), ShowProxy (GenTx block), ShowQuery (Query block)) ⇒ LocalNodeConnectInfo mode block → GenTx block → IO (SubmitResult (ApplyTxErr block))
- newtype LocalStateQueryClient block point (query ∷ Type → Type) (m ∷ Type → Type) a = LocalStateQueryClient {
- runLocalStateQueryClient ∷ m (ClientStIdle block point query m a)
- queryNodeLocalState ∷ ∀ mode block result. (ShowProxy block, ShowProxy (ApplyTxErr block), ShowProxy (Query block), ShowProxy (GenTx block), ShowQuery (Query block)) ⇒ LocalNodeConnectInfo mode block → (Point block, Query block result) → IO (Either AcquireFailure result)
- data StakePoolKey
- type PoolId = Hash StakePoolKey
- data KesKey
- data VrfKey
- data OperationalCertificate = OperationalCertificate !(OCert StandardCrypto) !(VerificationKey StakePoolKey)
- data OperationalCertificateIssueCounter = OperationalCertificateIssueCounter !Word64 !(VerificationKey StakePoolKey)
- newtype KESPeriod = KESPeriod {}
- data OperationalCertIssueError = OperationalCertKeyMismatch (VerificationKey StakePoolKey) (VerificationKey StakePoolKey)
- issueOperationalCertificate ∷ VerificationKey KesKey → Either (SigningKey StakePoolKey) (SigningKey GenesisDelegateExtendedKey) → KESPeriod → OperationalCertificateIssueCounter → Either OperationalCertIssueError (OperationalCertificate, OperationalCertificateIssueCounter)
- data GenesisKey
- data GenesisExtendedKey
- data GenesisDelegateKey
- data GenesisDelegateExtendedKey
- data GenesisUTxOKey
- genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn
- makeMIRCertificate ∷ MIRPot → [(StakeCredential, Lovelace)] → Certificate
- makeGenesisKeyDelegationCertificate ∷ Hash GenesisKey → Hash GenesisDelegateKey → Hash VrfKey → Certificate
- data UpdateProposal = UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo
- data ProtocolParametersUpdate = ProtocolParametersUpdate {
- protocolUpdateProtocolVersion ∷ Maybe (Natural, Natural)
- protocolUpdateDecentralization ∷ Maybe Rational
- protocolUpdateExtraPraosEntropy ∷ Maybe (Maybe PraosNonce)
- protocolUpdateMaxBlockHeaderSize ∷ Maybe Natural
- protocolUpdateMaxBlockBodySize ∷ Maybe Natural
- protocolUpdateMaxTxSize ∷ Maybe Natural
- protocolUpdateTxFeeFixed ∷ Maybe Natural
- protocolUpdateTxFeePerByte ∷ Maybe Natural
- protocolUpdateMinUTxOValue ∷ Maybe Lovelace
- protocolUpdateStakeAddressDeposit ∷ Maybe Lovelace
- protocolUpdateStakePoolDeposit ∷ Maybe Lovelace
- protocolUpdateMinPoolCost ∷ Maybe Lovelace
- protocolUpdatePoolRetireMaxEpoch ∷ Maybe EpochNo
- protocolUpdateStakePoolTargetNum ∷ Maybe Natural
- protocolUpdatePoolPledgeInfluence ∷ Maybe Rational
- protocolUpdateMonetaryExpansion ∷ Maybe Rational
- protocolUpdateTreasuryCut ∷ Maybe Rational
- newtype EpochNo = EpochNo {}
- newtype NetworkMagic = NetworkMagic {}
- makeShelleyUpdateProposal ∷ ProtocolParametersUpdate → [Hash GenesisKey] → EpochNo → UpdateProposal
- data PraosNonce
- makePraosNonce ∷ ByteString → PraosNonce
- fromByronTxIn ∷ TxIn → TxIn
- toByronLovelace ∷ Lovelace → Maybe Lovelace
- toByronNetworkMagic ∷ NetworkId → NetworkMagic
- toByronProtocolMagicId ∷ NetworkId → ProtocolMagicId
- toByronRequiresNetworkMagic ∷ NetworkId → RequiresNetworkMagic
- toShelleyNetwork ∷ NetworkId → Network
- toShelleyPoolParams ∷ StakePoolParameters → PoolParams StandardCrypto
- toShelleyStakeAddr ∷ StakeAddress → RewardAcnt StandardCrypto
- toNetworkMagic ∷ NetworkId → NetworkMagic
- data Addr crypto
- = Addr Network (PaymentCredential crypto) (StakeReference crypto)
- | AddrBootstrap (BootstrapAddress crypto)
- newtype Coin = Coin {}
- newtype EpochSize = EpochSize {}
- data GenDelegPair crypto = GenDelegPair {
- genDelegKeyHash ∷ !(KeyHash 'GenesisDelegate crypto)
- genDelegVrfHash ∷ !(Hash crypto (VerKeyVRF crypto))
- data KeyRole
- newtype KeyHash (discriminator ∷ KeyRole) crypto = KeyHash (Hash (ADDRHASH crypto) (VerKeyDSIGN (DSIGN crypto)))
- data PParams' (f ∷ Type → Type) era = PParams {
- _minfeeA ∷ !(HKD f Natural)
- _minfeeB ∷ !(HKD f Natural)
- _maxBBSize ∷ !(HKD f Natural)
- _maxTxSize ∷ !(HKD f Natural)
- _maxBHSize ∷ !(HKD f Natural)
- _keyDeposit ∷ !(HKD f Coin)
- _poolDeposit ∷ !(HKD f Coin)
- _eMax ∷ !(HKD f EpochNo)
- _nOpt ∷ !(HKD f Natural)
- _a0 ∷ !(HKD f Rational)
- _rho ∷ !(HKD f UnitInterval)
- _tau ∷ !(HKD f UnitInterval)
- _d ∷ !(HKD f UnitInterval)
- _extraEntropy ∷ !(HKD f Nonce)
- _protocolVersion ∷ !(HKD f ProtVer)
- _minUTxOValue ∷ !(HKD f Coin)
- _minPoolCost ∷ !(HKD f Coin)
- type PParamsUpdate era = PParams' StrictMaybe era
- type VerKeyVRF c = VerKeyVRF (VRF c)
- type StandardShelley = ShelleyEra StandardCrypto
- type StandardAllegra = AllegraEra StandardCrypto
- type StandardMary = MaryEra StandardCrypto
- emptyPParams ∷ PParams era
- truncateUnitInterval ∷ Ratio Word64 → UnitInterval
- emptyGenesisStaking ∷ ShelleyGenesisStaking crypto
- secondsToNominalDiffTime ∷ Double → NominalDiffTime
Eras
A type used as a tag to distinguish the Byron era.
Instances
| HasTypeProxy ByronEra Source # | |
| IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras | |
data ShelleyEra Source #
A type used as a tag to distinguish the Shelley era.
Instances
| HasTypeProxy ShelleyEra Source # | |
Defined in Cardano.Api.Eras Associated Types data AsType ShelleyEra Source # Methods proxyToAsType ∷ Proxy ShelleyEra → AsType ShelleyEra Source # | |
| IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras | |
data AllegraEra Source #
A type used as a tag to distinguish the Allegra era.
Instances
| HasTypeProxy AllegraEra Source # | |
Defined in Cardano.Api.Eras Associated Types data AsType AllegraEra Source # Methods proxyToAsType ∷ Proxy AllegraEra → AsType AllegraEra Source # | |
| IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras | |
A type used as a tag to distinguish the Mary era.
Instances
| HasTypeProxy MaryEra Source # | |
| IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras | |
data CardanoEra era where Source #
This GADT provides a value-level representation of all the Cardano eras. This enables pattern matching on the era to allow them to be treated in a non-uniform way.
This can be used in combination with the IsCardanoEra class to get access
to this value.
In combination this can often enable code that handles all eras, and does so uniformly where possible, and non-uniformly where necessary.
Constructors
| ByronEra ∷ CardanoEra ByronEra | |
| ShelleyEra ∷ CardanoEra ShelleyEra | |
| AllegraEra ∷ CardanoEra AllegraEra | |
| MaryEra ∷ CardanoEra MaryEra |
Instances
| Eq (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ CardanoEra era → CardanoEra era → Bool # (/=) ∷ CardanoEra era → CardanoEra era → Bool # | |
| Ord (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ CardanoEra era → CardanoEra era → Ordering # (<) ∷ CardanoEra era → CardanoEra era → Bool # (<=) ∷ CardanoEra era → CardanoEra era → Bool # (>) ∷ CardanoEra era → CardanoEra era → Bool # (>=) ∷ CardanoEra era → CardanoEra era → Bool # max ∷ CardanoEra era → CardanoEra era → CardanoEra era # min ∷ CardanoEra era → CardanoEra era → CardanoEra era # | |
| Show (CardanoEra era) Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → CardanoEra era → ShowS # show ∷ CardanoEra era → String # showList ∷ [CardanoEra era] → ShowS # | |
| TestEquality CardanoEra Source # | |
Defined in Cardano.Api.Eras Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). CardanoEra a → CardanoEra b → Maybe (a :~: b) # | |
class HasTypeProxy era ⇒ IsCardanoEra era where Source #
The class of Cardano eras. This allows uniform handling of all Cardano
eras, but also non-uniform by making case distinctions on the CardanoEra
constructors, or the CardanoEraStyle constructors via cardanoEraStyle.
Methods
cardanoEra ∷ CardanoEra era Source #
Instances
| IsCardanoEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsCardanoEra ByronEra Source # | |
Defined in Cardano.Api.Eras Methods | |
data AnyCardanoEra where Source #
Constructors
| AnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → AnyCardanoEra |
Instances
| Bounded AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras | |
| Enum AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods succ ∷ AnyCardanoEra → AnyCardanoEra # pred ∷ AnyCardanoEra → AnyCardanoEra # toEnum ∷ Int → AnyCardanoEra # fromEnum ∷ AnyCardanoEra → Int # enumFrom ∷ AnyCardanoEra → [AnyCardanoEra] # enumFromThen ∷ AnyCardanoEra → AnyCardanoEra → [AnyCardanoEra] # enumFromTo ∷ AnyCardanoEra → AnyCardanoEra → [AnyCardanoEra] # enumFromThenTo ∷ AnyCardanoEra → AnyCardanoEra → AnyCardanoEra → [AnyCardanoEra] # | |
| Eq AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras | |
| Show AnyCardanoEra Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → AnyCardanoEra → ShowS # show ∷ AnyCardanoEra → String # showList ∷ [AnyCardanoEra] → ShowS # | |
anyCardanoEra ∷ CardanoEra era → AnyCardanoEra Source #
Like the AnyCardanoEra constructor but does not demand a IsCardanoEra
class constraint.
data InAnyCardanoEra thing where Source #
This pairs up some era-dependent type with a CardanoEra value that tells
us what era it is, but hides the era type. This is useful when the era is
not statically known, for example when deserialising from a file.
Constructors
| InAnyCardanoEra ∷ IsCardanoEra era ⇒ CardanoEra era → thing era → InAnyCardanoEra thing |
Shelley-based eras
data ShelleyBasedEra era where Source #
While the Byron and Shelley eras are quite different, there are several eras that are based on Shelley with only minor differences. It is useful to be able to treat the Shelley-based eras in a mostly-uniform way.
Values of this type witness the fact that the era is Shelley-based. This can be used to constrain the era to being a Shelley-based on. It allows non-uniform handling making case distinctions on the constructor.
Constructors
| ShelleyBasedEraShelley ∷ ShelleyBasedEra ShelleyEra | |
| ShelleyBasedEraAllegra ∷ ShelleyBasedEra AllegraEra | |
| ShelleyBasedEraMary ∷ ShelleyBasedEra MaryEra |
Instances
| Eq (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (/=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # | |
| Ord (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ ShelleyBasedEra era → ShelleyBasedEra era → Ordering # (<) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (<=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (>) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # (>=) ∷ ShelleyBasedEra era → ShelleyBasedEra era → Bool # max ∷ ShelleyBasedEra era → ShelleyBasedEra era → ShelleyBasedEra era # min ∷ ShelleyBasedEra era → ShelleyBasedEra era → ShelleyBasedEra era # | |
| Show (ShelleyBasedEra era) Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → ShelleyBasedEra era → ShowS # show ∷ ShelleyBasedEra era → String # showList ∷ [ShelleyBasedEra era] → ShowS # | |
class (IsCardanoEra era, Crypto (ShelleyLedgerEra era) ~ StandardCrypto) ⇒ IsShelleyBasedEra era where Source #
The class of eras that are based on Shelley. This allows uniform handling
of Shelley-based eras, but also non-uniform by making case distinctions on
the ShelleyBasedEra constructors.
Methods
Instances
| IsShelleyBasedEra MaryEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra AllegraEra Source # | |
Defined in Cardano.Api.Eras Methods | |
| IsShelleyBasedEra ShelleyEra Source # | |
Defined in Cardano.Api.Eras Methods | |
data InAnyShelleyBasedEra thing where Source #
This pairs up some era-dependent type with a ShelleyBasedEra value that
tells us what era it is, but hides the era type. This is useful when the era
is not statically known, for example when deserialising from a file.
Constructors
| InAnyShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → thing era → InAnyShelleyBasedEra thing |
type family ShelleyLedgerEra era where ... Source #
A type family that connects our era type tags to equivalent type tags used in the Shelley ledger library.
This type mapping connect types from this API with types in the Shelley ledger library which allows writing conversion functions in a more generic way.
data CardanoEraStyle era where Source #
This is the same essential information as CardanoEra but instead of a
flat set of alternative eras, it is factored into the legcy Byron era and
the current Shelley-based eras.
This way of factoring the eras is useful because in many cases the major differences are between the Byron and Shelley-based eras, and the Shelley-based eras can often be treated uniformly.
Constructors
| LegacyByronEra ∷ CardanoEraStyle ByronEra | |
| ShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ ShelleyBasedEra era → CardanoEraStyle era |
Instances
| Eq (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods (==) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (/=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # | |
| Ord (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods compare ∷ CardanoEraStyle era → CardanoEraStyle era → Ordering # (<) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (<=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (>) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # (>=) ∷ CardanoEraStyle era → CardanoEraStyle era → Bool # max ∷ CardanoEraStyle era → CardanoEraStyle era → CardanoEraStyle era # min ∷ CardanoEraStyle era → CardanoEraStyle era → CardanoEraStyle era # | |
| Show (CardanoEraStyle era) Source # | |
Defined in Cardano.Api.Eras Methods showsPrec ∷ Int → CardanoEraStyle era → ShowS # show ∷ CardanoEraStyle era → String # showList ∷ [CardanoEraStyle era] → ShowS # | |
cardanoEraStyle ∷ CardanoEra era → CardanoEraStyle era Source #
The CardanoEraStyle for a CardanoEra.
Deprecated
type Shelley = ShelleyEra Source #
Deprecated: Use ShelleyEra or ShelleyAddr as appropriate
type Allegra = AllegraEra Source #
Deprecated: Use AllegraEra instead
Type tags
class HasTypeProxy t where Source #
Associated Types
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
Methods
proxyToAsType ∷ Proxy t → AsType t Source #
Instances
Cryptographic key interface
Cardano has lots of cryptographic keys used for lots of different purposes. Some keys have different representations, but most are just using keys in different roles.
To allow for the different representations and to avoid mistakes we distinguish the key role. These are type level distinctions, so each of these roles is a type level tag.
class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole Source #
An interface for cryptographic keys used for signatures with a SigningKey
and a VerificationKey key.
This interface does not provide actual signing or verifying functions since this API is concerned with the management of keys: generating and serialising.
Minimal complete definition
getVerificationKey, deterministicSigningKey, deterministicSigningKeySeedSize, verificationKeyHash
Instances
getVerificationKey ∷ Key keyrole ⇒ SigningKey keyrole → VerificationKey keyrole Source #
Get the corresponding verification key from a signing key.
verificationKeyHash ∷ Key keyrole ⇒ VerificationKey keyrole → Hash keyrole Source #
castVerificationKey ∷ CastVerificationKeyRole keyroleA keyroleB ⇒ VerificationKey keyroleA → VerificationKey keyroleB Source #
Change the role of a VerificationKey, if the representation permits.
castSigningKey ∷ CastSigningKeyRole keyroleA keyroleB ⇒ SigningKey keyroleA → SigningKey keyroleB Source #
Change the role of a SigningKey, if the representation permits.
Generating keys
generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole) Source #
Generate a SigningKey using a seed from operating system entropy.
deterministicSigningKey ∷ Key keyrole ⇒ AsType keyrole → Seed → SigningKey keyrole Source #
Generate a SigningKey deterministically, given a Seed. The
required size of the seed is given by deterministicSigningKeySeedSize.
Hashes
In Cardano most keys are identified by their hash, and hashes are used in many other places.
data family Hash keyrole ∷ Type Source #
Instances
Payment addresses
Constructing and inspecting normal payment addresses
data Address addrtype where Source #
Addresses are used as locations where assets live. The address determines the rights needed to spend assets at the address: in particular holding some signing key or being able to satisfy the conditions of a script.
There are currently two types of address:
- Byron addresses, which use the type tag
ByronAddr; and - Shelley addresses, which use the type tag
ShelleyAddr. Notably, Shelley addresses support scripts and stake delegation.
The address type is subtly from the ledger era in which each
address type is valid: while Byron addresses are the only choice in the
Byron era, the Shelley era and all subsequent eras support both Byron and
Shelley addresses. The Address type param only says the type of the address
(either Byron or Shelley). The AddressInEra type connects the address type
with the era in which it is supported.
Constructors
| ByronAddress ∷ Address → Address ByronAddr | Byron addresses were the only supported address type in the original Byron era. |
| ShelleyAddress ∷ Network → PaymentCredential StandardCrypto → StakeReference StandardCrypto → Address ShelleyAddr | Shelley addresses allow delegation. Shelley addresses were introduced in Shelley era and are thus supported from the Shelley era onwards |
Instances
A type used as a tag to distinguish Byron addresses.
Instances
| HasTypeProxy ByronAddr Source # | |
| SerialiseAsRawBytes (Address ByronAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseToRawBytes ∷ Address ByronAddr → ByteString Source # deserialiseFromRawBytes ∷ AsType (Address ByronAddr) → ByteString → Maybe (Address ByronAddr) Source # | |
| SerialiseAddress (Address ByronAddr) Source # | |
| data AsType ByronAddr Source # | |
Defined in Cardano.Api.Address | |
data ShelleyAddr Source #
A type used as a tag to distinguish Shelley addresses.
Instances
| HasTypeProxy ShelleyAddr Source # | |
Defined in Cardano.Api.Address Associated Types data AsType ShelleyAddr Source # Methods proxyToAsType ∷ Proxy ShelleyAddr → AsType ShelleyAddr Source # | |
| SerialiseAsRawBytes (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address | |
| SerialiseAsBech32 (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods bech32PrefixFor ∷ Address ShelleyAddr → Text Source # bech32PrefixesPermitted ∷ AsType (Address ShelleyAddr) → [Text] Source # | |
| SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ Address ShelleyAddr → Text Source # deserialiseAddress ∷ AsType (Address ShelleyAddr) → Text → Maybe (Address ShelleyAddr) Source # | |
| data AsType ShelleyAddr Source # | |
Defined in Cardano.Api.Address | |
Constructors
| Mainnet | |
| Testnet !NetworkMagic |
Instances
Byron addresses
Byron-era payment keys. Used for Byron addresses and witnessing transactions that spend from these addresses.
These use Ed25519 but with a 32byte "chaincode" used in HD derivation.
The inclusion of the chaincode is a design mistake but one that cannot
be corrected for the Byron era. The Shelley era PaymentKeys do not include
a chaincode. It is safe to use a zero or random chaincode for new Byron keys.
This is a type level tag, used with other interfaces like Key.
Instances
data ByronKeyLegacy Source #
Instances
Shelley addresses
makeShelleyAddress ∷ NetworkId → PaymentCredential → StakeAddressReference → Address ShelleyAddr Source #
data PaymentCredential Source #
Constructors
| PaymentCredentialByKey (Hash PaymentKey) | |
| PaymentCredentialByScript ScriptHash |
Instances
| Eq PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods | |
| Ord PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods compare ∷ PaymentCredential → PaymentCredential → Ordering # (<) ∷ PaymentCredential → PaymentCredential → Bool # (<=) ∷ PaymentCredential → PaymentCredential → Bool # (>) ∷ PaymentCredential → PaymentCredential → Bool # (>=) ∷ PaymentCredential → PaymentCredential → Bool # max ∷ PaymentCredential → PaymentCredential → PaymentCredential # min ∷ PaymentCredential → PaymentCredential → PaymentCredential # | |
| Show PaymentCredential Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → PaymentCredential → ShowS # show ∷ PaymentCredential → String # showList ∷ [PaymentCredential] → ShowS # | |
data StakeAddressReference Source #
Constructors
| StakeAddressByValue StakeCredential | |
| StakeAddressByPointer StakeAddressPointer | |
| NoStakeAddress |
Instances
| Eq StakeAddressReference Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ StakeAddressReference → StakeAddressReference → Bool # (/=) ∷ StakeAddressReference → StakeAddressReference → Bool # | |
| Show StakeAddressReference Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → StakeAddressReference → ShowS # show ∷ StakeAddressReference → String # showList ∷ [StakeAddressReference] → ShowS # | |
data PaymentKey Source #
Shelley-era payment keys. Used for Shelley payment addresses and witnessing transactions that spend from these addresses.
This is a type level tag, used with other interfaces like Key.
Instances
data PaymentExtendedKey Source #
Shelley-era payment keys using extended ed25519 cryptographic keys.
They can be used for Shelley payment addresses and witnessing transactions that spend from these addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey PaymentKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey PaymentKey).
This is a type level tag, used with other interfaces like Key.
Instances
Addresses in any era
data AddressAny Source #
Either a Byron address or a Shelley address.
Sometimes we need to be able to work with either of the two types of address (Byron or Shelley addresses), but without reference to an era in which the address will be used. This type serves that purpose.
Constructors
| AddressByron !(Address ByronAddr) | |
| AddressShelley !(Address ShelleyAddr) |
Instances
Addresses in specific eras
data AddressInEra era where Source #
An Address that can be used in a particular ledger era.
All current ledger eras support Byron addresses. Shelley addresses are
supported in the ShelleyEra and later eras.
Constructors
| AddressInEra ∷ AddressTypeInEra addrtype era → Address addrtype → AddressInEra era |
Instances
data AddressTypeInEra addrtype era where Source #
Constructors
| ByronAddressInAnyEra ∷ AddressTypeInEra ByronAddr era | |
| ShelleyAddressInEra ∷ ShelleyBasedEra era → AddressTypeInEra ShelleyAddr era |
Instances
| Show (AddressTypeInEra addrtype era) Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → AddressTypeInEra addrtype era → ShowS # show ∷ AddressTypeInEra addrtype era → String # showList ∷ [AddressTypeInEra addrtype era] → ShowS # | |
byronAddressInEra ∷ Address ByronAddr → AddressInEra era Source #
shelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ Address ShelleyAddr → AddressInEra era Source #
anyAddressInShelleyBasedEra ∷ IsShelleyBasedEra era ⇒ AddressAny → AddressInEra era Source #
anyAddressInEra ∷ CardanoEra era → AddressAny → Maybe (AddressInEra era) Source #
toAddressAny ∷ Address addr → AddressAny Source #
makeShelleyAddressInEra ∷ IsShelleyBasedEra era ⇒ NetworkId → PaymentCredential → StakeAddressReference → AddressInEra era Source #
Stake addresses
Constructing and inspecting stake addresses
data StakeAddress where Source #
Constructors
| StakeAddress ∷ Network → StakeCredential StandardCrypto → StakeAddress |
Instances
data StakeCredential Source #
Constructors
| StakeCredentialByKey (Hash StakeKey) | |
| StakeCredentialByScript ScriptHash |
Instances
| Eq StakeCredential Source # | |
Defined in Cardano.Api.Address Methods (==) ∷ StakeCredential → StakeCredential → Bool # (/=) ∷ StakeCredential → StakeCredential → Bool # | |
| Ord StakeCredential Source # | |
Defined in Cardano.Api.Address Methods compare ∷ StakeCredential → StakeCredential → Ordering # (<) ∷ StakeCredential → StakeCredential → Bool # (<=) ∷ StakeCredential → StakeCredential → Bool # (>) ∷ StakeCredential → StakeCredential → Bool # (>=) ∷ StakeCredential → StakeCredential → Bool # | |
| Show StakeCredential Source # | |
Defined in Cardano.Api.Address Methods showsPrec ∷ Int → StakeCredential → ShowS # show ∷ StakeCredential → String # showList ∷ [StakeCredential] → ShowS # | |
Instances
data StakeExtendedKey Source #
Shelley-era stake keys using extended ed25519 cryptographic keys.
They can be used for Shelley stake addresses and witnessing transactions that use stake addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey StakeKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey StakeKey).
This is a type level tag, used with other interfaces like Key.
Instances
Currency values
Ada / Lovelace
Instances
| Enum Lovelace Source # | |
| Eq Lovelace Source # | |
| Num Lovelace Source # | |
| Ord Lovelace Source # | |
| Show Lovelace Source # | |
| Semigroup Lovelace Source # | |
| Monoid Lovelace Source # | |
| FromJSON Lovelace Source # | |
Defined in Cardano.Api.Value | |
| ToJSON Lovelace Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
Multi-asset values
Instances
| Eq Quantity Source # | |
| Num Quantity Source # | |
| Ord Quantity Source # | |
| Show Quantity Source # | |
| Semigroup Quantity Source # | |
| Monoid Quantity Source # | |
| FromJSON Quantity Source # | |
Defined in Cardano.Api.Value | |
| ToJSON Quantity Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Quantity → Encoding # toJSONList ∷ [Quantity] → Value # toEncodingList ∷ [Quantity] → Encoding # | |
Constructors
| PolicyId ScriptHash |
Instances
| Eq PolicyId Source # | |
| Ord PolicyId Source # | |
| Show PolicyId Source # | |
| IsString PolicyId Source # | |
Defined in Cardano.Api.Value Methods fromString ∷ String → PolicyId # | |
| HasTypeProxy PolicyId Source # | |
| SerialiseAsRawBytes PolicyId Source # | |
Defined in Cardano.Api.Value Methods serialiseToRawBytes ∷ PolicyId → ByteString Source # deserialiseFromRawBytes ∷ AsType PolicyId → ByteString → Maybe PolicyId Source # | |
| data AsType PolicyId Source # | |
Defined in Cardano.Api.Value | |
Constructors
| AssetName ByteString |
Instances
| Eq AssetName Source # | |
| Ord AssetName Source # | |
Defined in Cardano.Api.Value | |
| Show AssetName Source # | |
| IsString AssetName Source # | |
Defined in Cardano.Api.Value Methods fromString ∷ String → AssetName # | |
| FromJSON AssetName Source # | |
Defined in Cardano.Api.Value | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| FromJSONKey AssetName Source # | |
Defined in Cardano.Api.Value | |
| ToJSONKey AssetName Source # | |
Defined in Cardano.Api.Value | |
| HasTypeProxy AssetName Source # | |
| SerialiseAsRawBytes AssetName Source # | |
Defined in Cardano.Api.Value | |
| data AsType AssetName Source # | |
Defined in Cardano.Api.Value | |
Constructors
| AdaAssetId | |
| AssetId !PolicyId !AssetName |
Instances
negateValue ∷ Value → Value Source #
This lets you write a - b as a <> negateValue b.
Ada / Lovelace within multi-asset values
valueToLovelace ∷ Value → Maybe Lovelace Source #
Check if the Value consists of only Lovelace and no other assets,
and if so then return the Lovelace.
See also selectLovelace to select the Lovelace quantity from the Value,
ignoring other assets.
Alternative nested representation
newtype ValueNestedRep Source #
Constructors
| ValueNestedRep [ValueNestedBundle] |
Instances
| Eq ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods (==) ∷ ValueNestedRep → ValueNestedRep → Bool # (/=) ∷ ValueNestedRep → ValueNestedRep → Bool # | |
| Ord ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods compare ∷ ValueNestedRep → ValueNestedRep → Ordering # (<) ∷ ValueNestedRep → ValueNestedRep → Bool # (<=) ∷ ValueNestedRep → ValueNestedRep → Bool # (>) ∷ ValueNestedRep → ValueNestedRep → Bool # (>=) ∷ ValueNestedRep → ValueNestedRep → Bool # | |
| Show ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods showsPrec ∷ Int → ValueNestedRep → ShowS # show ∷ ValueNestedRep → String # showList ∷ [ValueNestedRep] → ShowS # | |
| FromJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value | |
| ToJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods toJSON ∷ ValueNestedRep → Value # toEncoding ∷ ValueNestedRep → Encoding # toJSONList ∷ [ValueNestedRep] → Value # toEncodingList ∷ [ValueNestedRep] → Encoding # | |
data ValueNestedBundle Source #
A bundle within a ValueNestedRep for a single PolicyId, or for the
special case of ada.
Constructors
| ValueNestedBundleAda Quantity | |
| ValueNestedBundle PolicyId (Map AssetName Quantity) |
Instances
| Eq ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods | |
| Ord ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods compare ∷ ValueNestedBundle → ValueNestedBundle → Ordering # (<) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (<=) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (>) ∷ ValueNestedBundle → ValueNestedBundle → Bool # (>=) ∷ ValueNestedBundle → ValueNestedBundle → Bool # max ∷ ValueNestedBundle → ValueNestedBundle → ValueNestedBundle # min ∷ ValueNestedBundle → ValueNestedBundle → ValueNestedBundle # | |
| Show ValueNestedBundle Source # | |
Defined in Cardano.Api.Value Methods showsPrec ∷ Int → ValueNestedBundle → ShowS # show ∷ ValueNestedBundle → String # showList ∷ [ValueNestedBundle] → ShowS # | |
Building transactions
Constructing and inspecting transactions
Transaction bodies
data TxBody era where Source #
Constructors
| ByronTxBody ∷ Annotated Tx ByteString → TxBody ByronEra | |
| ShelleyTxBody ∷ ShelleyBasedEra era → TxBody (ShelleyLedgerEra era) → Maybe (AuxiliaryData (ShelleyLedgerEra era)) → TxBody era |
Instances
| Eq (TxBody era) Source # | |
| Show (TxBody era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (TxBody era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToCBOR ∷ TxBody era → ByteString Source # deserialiseFromCBOR ∷ AsType (TxBody era) → ByteString → Either DecoderError (TxBody era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (TxBody era) Source # | |
Defined in Cardano.Api.TxBody Methods textEnvelopeType ∷ AsType (TxBody era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ TxBody era → TextEnvelopeDescr Source # | |
| data AsType (TxBody era) Source # | |
Defined in Cardano.Api.TxBody | |
makeTransactionBody ∷ ∀ era. IsCardanoEra era ⇒ TxBodyContent era → Either (TxBodyError era) (TxBody era) Source #
data TxBodyContent era Source #
Constructors
| TxBodyContent | |
Fields
| |
data TxBodyError era Source #
Constructors
| TxBodyEmptyTxIns | |
| TxBodyEmptyTxOuts | |
| TxBodyOutputNegative Quantity (TxOut era) | |
| TxBodyOutputOverflow Quantity (TxOut era) | |
| TxBodyMetadataError [(Word64, TxMetadataRangeError)] | |
| TxBodyMintAdaError |
Instances
| Show (TxBodyError era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxBodyError era → ShowS # show ∷ TxBodyError era → String # showList ∷ [TxBodyError era] → ShowS # | |
| Error (TxBodyError era) Source # | |
Defined in Cardano.Api.TxBody Methods displayError ∷ TxBodyError era → String Source # | |
Transitional utils
makeByronTransaction ∷ [TxIn] → [TxOut ByronEra] → Either (TxBodyError ByronEra) (TxBody ByronEra) Source #
Transitional function to help the CLI move to the updated TxBody API.
makeShelleyTransaction ∷ [TxIn] → [TxOut ShelleyEra] → SlotNo → Lovelace → [Certificate] → [(StakeAddress, Lovelace)] → Maybe TxMetadata → Maybe UpdateProposal → Either (TxBodyError ShelleyEra) (TxBody ShelleyEra) Source #
Transitional function to help the CLI move to the updated TxBody API.
Transaction Ids
Constructors
| TxId (Hash StandardCrypto EraIndependentTxBody) |
Instances
| Eq TxId Source # | |
| Ord TxId Source # | |
| Show TxId Source # | |
| IsString TxId Source # | |
Defined in Cardano.Api.TxBody Methods fromString ∷ String → TxId # | |
| HasTypeProxy TxId Source # | |
| SerialiseAsRawBytes TxId Source # | |
Defined in Cardano.Api.TxBody Methods serialiseToRawBytes ∷ TxId → ByteString Source # deserialiseFromRawBytes ∷ AsType TxId → ByteString → Maybe TxId Source # | |
| data AsType TxId Source # | |
Defined in Cardano.Api.TxBody | |
Transaction inputs
Transaction outputs
Constructors
| TxOut (AddressInEra era) (TxOutValue era) |
Instances
data TxOutValue era where Source #
Constructors
| TxOutAdaOnly ∷ OnlyAdaSupportedInEra era → Lovelace → TxOutValue era | |
| TxOutValue ∷ MultiAssetSupportedInEra era → Value → TxOutValue era |
Instances
| Eq (TxOutValue era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxOutValue era → TxOutValue era → Bool # (/=) ∷ TxOutValue era → TxOutValue era → Bool # | |
| Show (TxOutValue era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxOutValue era → ShowS # show ∷ TxOutValue era → String # showList ∷ [TxOutValue era] → ShowS # | |
Other transaction body types
Constructors
| TxFeeImplicit ∷ TxFeesImplicitInEra era → TxFee era | |
| TxFeeExplicit ∷ TxFeesExplicitInEra era → Lovelace → TxFee era |
Instances
data TxValidityLowerBound era where Source #
Constructors
| TxValidityNoLowerBound ∷ TxValidityLowerBound era | |
| TxValidityLowerBound ∷ ValidityLowerBoundSupportedInEra era → SlotNo → TxValidityLowerBound era |
Instances
| Eq (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool # (/=) ∷ TxValidityLowerBound era → TxValidityLowerBound era → Bool # | |
| Show (TxValidityLowerBound era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxValidityLowerBound era → ShowS # show ∷ TxValidityLowerBound era → String # showList ∷ [TxValidityLowerBound era] → ShowS # | |
data TxValidityUpperBound era where Source #
This was formerly known as the TTL.
Constructors
| TxValidityNoUpperBound ∷ ValidityNoUpperBoundSupportedInEra era → TxValidityUpperBound era | |
| TxValidityUpperBound ∷ ValidityUpperBoundSupportedInEra era → SlotNo → TxValidityUpperBound era |
Instances
| Eq (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool # (/=) ∷ TxValidityUpperBound era → TxValidityUpperBound era → Bool # | |
| Show (TxValidityUpperBound era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxValidityUpperBound era → ShowS # show ∷ TxValidityUpperBound era → String # showList ∷ [TxValidityUpperBound era] → ShowS # | |
Instances
| Bounded SlotNo | |
| Enum SlotNo | |
Defined in Cardano.Slotting.Slot | |
| Eq SlotNo | |
| Num SlotNo | |
| Ord SlotNo | |
| Show SlotNo | |
| Generic SlotNo | |
| NFData SlotNo | |
Defined in Cardano.Slotting.Slot | |
| NoThunks SlotNo | |
| FromCBOR SlotNo | |
| ToCBOR SlotNo | |
| FromJSON SlotNo | |
Defined in Cardano.Slotting.Slot | |
| ToJSON SlotNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ SlotNo → Encoding # toJSONList ∷ [SlotNo] → Value # toEncodingList ∷ [SlotNo] → Encoding # | |
| Condense SlotNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| Serialise SlotNo | |
Defined in Cardano.Slotting.Slot | |
| HasField "ttl" (TxBody era) SlotNo | |
Defined in Shelley.Spec.Ledger.TxBody | |
| HasHeader block ⇒ Anchorable (WithOrigin SlotNo) (Anchor block) block | |
Defined in Ouroboros.Network.AnchoredFragment Methods asAnchor ∷ block → Anchor block getAnchorMeasure ∷ Proxy block → Anchor block → WithOrigin SlotNo | |
| Anchorable (WithOrigin SlotNo) (HeaderState blk) (HeaderState blk) | |
Defined in Ouroboros.Consensus.HeaderValidation Methods asAnchor ∷ HeaderState blk → HeaderState blk getAnchorMeasure ∷ Proxy (HeaderState blk) → HeaderState blk → WithOrigin SlotNo | |
| GetTip l ⇒ Anchorable (WithOrigin SlotNo) (Checkpoint l) (Checkpoint l) | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory Methods asAnchor ∷ Checkpoint l → Checkpoint l getAnchorMeasure ∷ Proxy (Checkpoint l) → Checkpoint l → WithOrigin SlotNo | |
| Embed (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
| HasExp (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
Defined in Shelley.Spec.Ledger.TxBody | |
| type Rep SlotNo | |
Defined in Cardano.Slotting.Slot type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-e2258fd540e9b0f326f2acf99f1179af359b3cd0d4a73c3fbc72c8d4df62554a" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
data TxMetadataInEra era where Source #
Constructors
| TxMetadataNone ∷ TxMetadataInEra era | |
| TxMetadataInEra ∷ TxMetadataSupportedInEra era → TxMetadata → TxMetadataInEra era |
Instances
| Eq (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool # (/=) ∷ TxMetadataInEra era → TxMetadataInEra era → Bool # | |
| Show (TxMetadataInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMetadataInEra era → ShowS # show ∷ TxMetadataInEra era → String # showList ∷ [TxMetadataInEra era] → ShowS # | |
data TxAuxScripts era where Source #
Constructors
| TxAuxScriptsNone ∷ TxAuxScripts era | |
| TxAuxScripts ∷ AuxScriptsSupportedInEra era → [ScriptInEra era] → TxAuxScripts era |
Instances
| Eq (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxAuxScripts era → TxAuxScripts era → Bool # (/=) ∷ TxAuxScripts era → TxAuxScripts era → Bool # | |
| Show (TxAuxScripts era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxAuxScripts era → ShowS # show ∷ TxAuxScripts era → String # showList ∷ [TxAuxScripts era] → ShowS # | |
data TxWithdrawals era where Source #
Constructors
| TxWithdrawalsNone ∷ TxWithdrawals era | |
| TxWithdrawals ∷ WithdrawalsSupportedInEra era → [(StakeAddress, Lovelace)] → TxWithdrawals era |
Instances
| Eq (TxWithdrawals era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxWithdrawals era → TxWithdrawals era → Bool # (/=) ∷ TxWithdrawals era → TxWithdrawals era → Bool # | |
| Show (TxWithdrawals era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxWithdrawals era → ShowS # show ∷ TxWithdrawals era → String # showList ∷ [TxWithdrawals era] → ShowS # | |
data TxCertificates era where Source #
Constructors
| TxCertificatesNone ∷ TxCertificates era | |
| TxCertificates ∷ CertificatesSupportedInEra era → [Certificate] → TxCertificates era |
Instances
| Eq (TxCertificates era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxCertificates era → TxCertificates era → Bool # (/=) ∷ TxCertificates era → TxCertificates era → Bool # | |
| Show (TxCertificates era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxCertificates era → ShowS # show ∷ TxCertificates era → String # showList ∷ [TxCertificates era] → ShowS # | |
data Certificate Source #
Constructors
Instances
toShelleyCertificate ∷ Certificate → DCert StandardCrypto Source #
fromShelleyCertificate ∷ DCert StandardCrypto → Certificate Source #
data TxUpdateProposal era where Source #
Constructors
| TxUpdateProposalNone ∷ TxUpdateProposal era | |
| TxUpdateProposal ∷ UpdateProposalSupportedInEra era → UpdateProposal → TxUpdateProposal era |
Instances
| Eq (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool # (/=) ∷ TxUpdateProposal era → TxUpdateProposal era → Bool # | |
| Show (TxUpdateProposal era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxUpdateProposal era → ShowS # show ∷ TxUpdateProposal era → String # showList ∷ [TxUpdateProposal era] → ShowS # | |
data TxMintValue era where Source #
Constructors
| TxMintNone ∷ TxMintValue era | |
| TxMintValue ∷ MultiAssetSupportedInEra era → Value → TxMintValue era |
Instances
| Eq (TxMintValue era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMintValue era → TxMintValue era → Bool # (/=) ∷ TxMintValue era → TxMintValue era → Bool # | |
| Show (TxMintValue era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMintValue era → ShowS # show ∷ TxMintValue era → String # showList ∷ [TxMintValue era] → ShowS # | |
Era-dependent transaction body features
data MultiAssetSupportedInEra era where Source #
A representation of whether the era supports multi-asset transactions.
The Mary and subsequent eras support multi-asset transactions.
The negation of this is OnlyAdaSupportedInEra.
Constructors
| MultiAssetInMaryEra ∷ MultiAssetSupportedInEra MaryEra | Multi-asset transactions are supported in the |
Instances
| Eq (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool # (/=) ∷ MultiAssetSupportedInEra era → MultiAssetSupportedInEra era → Bool # | |
| Show (MultiAssetSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → MultiAssetSupportedInEra era → ShowS # show ∷ MultiAssetSupportedInEra era → String # showList ∷ [MultiAssetSupportedInEra era] → ShowS # | |
data OnlyAdaSupportedInEra era where Source #
A representation of whether the era supports only ada transactions.
Prior to the Mary era only ada transactions are supported. Multi-assets are supported from the Mary era onwards.
This is the negation of MultiAssetSupportedInEra. It exists since we need
evidence to be positive.
Constructors
| AdaOnlyInByronEra ∷ OnlyAdaSupportedInEra ByronEra | |
| AdaOnlyInShelleyEra ∷ OnlyAdaSupportedInEra ShelleyEra | |
| AdaOnlyInAllegraEra ∷ OnlyAdaSupportedInEra AllegraEra |
Instances
| Eq (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool # (/=) ∷ OnlyAdaSupportedInEra era → OnlyAdaSupportedInEra era → Bool # | |
| Show (OnlyAdaSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → OnlyAdaSupportedInEra era → ShowS # show ∷ OnlyAdaSupportedInEra era → String # showList ∷ [OnlyAdaSupportedInEra era] → ShowS # | |
data TxFeesExplicitInEra era where Source #
A representation of whether the era requires explicitly specified fees in transactions.
The Byron era tx fees are implicit (as the difference bettween the sum of outputs and sum of inputs), but all later eras the fees are specified in the transaction explicitly.
Constructors
| TxFeesExplicitInShelleyEra ∷ TxFeesExplicitInEra ShelleyEra | |
| TxFeesExplicitInAllegraEra ∷ TxFeesExplicitInEra AllegraEra | |
| TxFeesExplicitInMaryEra ∷ TxFeesExplicitInEra MaryEra |
Instances
| Eq (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool # (/=) ∷ TxFeesExplicitInEra era → TxFeesExplicitInEra era → Bool # | |
| Show (TxFeesExplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxFeesExplicitInEra era → ShowS # show ∷ TxFeesExplicitInEra era → String # showList ∷ [TxFeesExplicitInEra era] → ShowS # | |
data TxFeesImplicitInEra era where Source #
A representation of whether the era requires implicitly specified fees in transactions.
This is the negation of TxFeesExplicitInEra.
Constructors
| TxFeesImplicitInByronEra ∷ TxFeesImplicitInEra ByronEra |
Instances
| Eq (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool # (/=) ∷ TxFeesImplicitInEra era → TxFeesImplicitInEra era → Bool # | |
| Show (TxFeesImplicitInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxFeesImplicitInEra era → ShowS # show ∷ TxFeesImplicitInEra era → String # showList ∷ [TxFeesImplicitInEra era] → ShowS # | |
data ValidityUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with an upper bound on the range of slots in which they are valid.
The Shelley and subsequent eras support an upper bound on the validity range. In the Shelley era specifically it is actually required. It is optional in later eras.
Constructors
Instances
| Eq (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool # (/=) ∷ ValidityUpperBoundSupportedInEra era → ValidityUpperBoundSupportedInEra era → Bool # | |
| Show (ValidityUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityUpperBoundSupportedInEra era → ShowS # show ∷ ValidityUpperBoundSupportedInEra era → String # showList ∷ [ValidityUpperBoundSupportedInEra era] → ShowS # | |
data ValidityNoUpperBoundSupportedInEra era where Source #
A representation of whether the era supports transactions having no upper bound on the range of slots in which they are valid.
Note that the ShelleyEra does not support omitting a validity upper
bound. It was introduced as a required field in Shelley and then made
optional in Allegra and subsequent eras.
The Byron era supports this by virtue of the fact that it does not support validity ranges at all.
Constructors
Instances
| Eq (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool # (/=) ∷ ValidityNoUpperBoundSupportedInEra era → ValidityNoUpperBoundSupportedInEra era → Bool # | |
| Show (ValidityNoUpperBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityNoUpperBoundSupportedInEra era → ShowS # show ∷ ValidityNoUpperBoundSupportedInEra era → String # showList ∷ [ValidityNoUpperBoundSupportedInEra era] → ShowS # | |
data ValidityLowerBoundSupportedInEra era where Source #
A representation of whether the era supports transactions with a lower bound on the range of slots in which they are valid.
The Allegra and subsequent eras support an optional lower bound on the
validity range. No equivalent of ValidityNoUpperBoundSupportedInEra is
needed since all eras support having no lower bound.
Constructors
| ValidityLowerBoundInAllegraEra ∷ ValidityLowerBoundSupportedInEra AllegraEra | |
| ValidityLowerBoundInMaryEra ∷ ValidityLowerBoundSupportedInEra MaryEra |
Instances
| Eq (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool # (/=) ∷ ValidityLowerBoundSupportedInEra era → ValidityLowerBoundSupportedInEra era → Bool # | |
| Show (ValidityLowerBoundSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → ValidityLowerBoundSupportedInEra era → ShowS # show ∷ ValidityLowerBoundSupportedInEra era → String # showList ∷ [ValidityLowerBoundSupportedInEra era] → ShowS # | |
data TxMetadataSupportedInEra era where Source #
A representation of whether the era supports transaction metadata.
Transaction metadata is supported from the Shelley era onwards.
Constructors
| TxMetadataInShelleyEra ∷ TxMetadataSupportedInEra ShelleyEra | |
| TxMetadataInAllegraEra ∷ TxMetadataSupportedInEra AllegraEra | |
| TxMetadataInMaryEra ∷ TxMetadataSupportedInEra MaryEra |
Instances
| Eq (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool # (/=) ∷ TxMetadataSupportedInEra era → TxMetadataSupportedInEra era → Bool # | |
| Show (TxMetadataSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → TxMetadataSupportedInEra era → ShowS # show ∷ TxMetadataSupportedInEra era → String # showList ∷ [TxMetadataSupportedInEra era] → ShowS # | |
data AuxScriptsSupportedInEra era where Source #
A representation of whether the era supports auxiliary scripts in transactions.
Auxiliary scripts are supported from the Allegra era onwards.
Constructors
| AuxScriptsInAllegraEra ∷ AuxScriptsSupportedInEra AllegraEra | |
| AuxScriptsInMaryEra ∷ AuxScriptsSupportedInEra MaryEra |
Instances
| Eq (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool # (/=) ∷ AuxScriptsSupportedInEra era → AuxScriptsSupportedInEra era → Bool # | |
| Show (AuxScriptsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → AuxScriptsSupportedInEra era → ShowS # show ∷ AuxScriptsSupportedInEra era → String # showList ∷ [AuxScriptsSupportedInEra era] → ShowS # | |
data WithdrawalsSupportedInEra era where Source #
A representation of whether the era supports withdrawals from reward accounts.
The Shelley and subsequent eras support stake addresses, their associated reward accounts and support for withdrawals from them.
Constructors
| WithdrawalsInShelleyEra ∷ WithdrawalsSupportedInEra ShelleyEra | |
| WithdrawalsInAllegraEra ∷ WithdrawalsSupportedInEra AllegraEra | |
| WithdrawalsInMaryEra ∷ WithdrawalsSupportedInEra MaryEra |
Instances
| Eq (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool # (/=) ∷ WithdrawalsSupportedInEra era → WithdrawalsSupportedInEra era → Bool # | |
| Show (WithdrawalsSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → WithdrawalsSupportedInEra era → ShowS # show ∷ WithdrawalsSupportedInEra era → String # showList ∷ [WithdrawalsSupportedInEra era] → ShowS # | |
data CertificatesSupportedInEra era where Source #
A representation of whether the era supports Certificates embedded in
transactions.
The Shelley and subsequent eras support such certificates.
Constructors
| CertificatesInShelleyEra ∷ CertificatesSupportedInEra ShelleyEra | |
| CertificatesInAllegraEra ∷ CertificatesSupportedInEra AllegraEra | |
| CertificatesInMaryEra ∷ CertificatesSupportedInEra MaryEra |
Instances
| Eq (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool # (/=) ∷ CertificatesSupportedInEra era → CertificatesSupportedInEra era → Bool # | |
| Show (CertificatesSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → CertificatesSupportedInEra era → ShowS # show ∷ CertificatesSupportedInEra era → String # showList ∷ [CertificatesSupportedInEra era] → ShowS # | |
data UpdateProposalSupportedInEra era where Source #
A representation of whether the era supports UpdateProposals embedded in
transactions.
The Shelley and subsequent eras support such update proposals. They Byron era has a notion of an update proposal, but it is a standalone chain object and not embedded in a transaction.
Constructors
Instances
| Eq (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods (==) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool # (/=) ∷ UpdateProposalSupportedInEra era → UpdateProposalSupportedInEra era → Bool # | |
| Show (UpdateProposalSupportedInEra era) Source # | |
Defined in Cardano.Api.TxBody Methods showsPrec ∷ Int → UpdateProposalSupportedInEra era → ShowS # show ∷ UpdateProposalSupportedInEra era → String # showList ∷ [UpdateProposalSupportedInEra era] → ShowS # | |
Feature availability functions
multiAssetSupportedInEra ∷ CardanoEra era → Either (OnlyAdaSupportedInEra era) (MultiAssetSupportedInEra era) Source #
txFeesExplicitInEra ∷ CardanoEra era → Either (TxFeesImplicitInEra era) (TxFeesExplicitInEra era) Source #
validityUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityUpperBoundSupportedInEra era) Source #
validityNoUpperBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityNoUpperBoundSupportedInEra era) Source #
validityLowerBoundSupportedInEra ∷ CardanoEra era → Maybe (ValidityLowerBoundSupportedInEra era) Source #
txMetadataSupportedInEra ∷ CardanoEra era → Maybe (TxMetadataSupportedInEra era) Source #
auxScriptsSupportedInEra ∷ CardanoEra era → Maybe (AuxScriptsSupportedInEra era) Source #
withdrawalsSupportedInEra ∷ CardanoEra era → Maybe (WithdrawalsSupportedInEra era) Source #
certificatesSupportedInEra ∷ CardanoEra era → Maybe (CertificatesSupportedInEra era) Source #
Signing transactions
Creating transaction witnesses one by one, or all in one go.
Constructors
| ByronTx ∷ ATxAux ByteString → Tx ByronEra | |
| ShelleyTx ∷ ShelleyBasedEra era → Tx (ShelleyLedgerEra era) → Tx era |
Instances
| Eq (Tx era) Source # | |
| Show (Tx era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (Tx era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (Tx era) Source # | |
Defined in Cardano.Api.Tx Methods serialiseToCBOR ∷ Tx era → ByteString Source # deserialiseFromCBOR ∷ AsType (Tx era) → ByteString → Either DecoderError (Tx era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (Tx era) Source # | |
Defined in Cardano.Api.Tx Methods textEnvelopeType ∷ AsType (Tx era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Tx era → TextEnvelopeDescr Source # | |
| data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx | |
getTxWitnesses ∷ ∀ era. Tx era → [Witness era] Source #
Signing in one go
data ShelleySigningKey Source #
We support making key witnesses with both normal and extended signing keys.
signShelleyTransaction ∷ IsShelleyBasedEra era ⇒ TxBody era → [ShelleyWitnessSigningKey] → Tx era Source #
Incremental signing and separate witnesses
data Witness era where Source #
Constructors
| ByronKeyWitness ∷ TxInWitness → Witness ByronEra | |
| ShelleyBootstrapWitness ∷ ShelleyBasedEra era → BootstrapWitness StandardCrypto → Witness era | |
| ShelleyKeyWitness ∷ ShelleyBasedEra era → WitVKey Witness StandardCrypto → Witness era | |
| ShelleyScriptWitness ∷ ShelleyBasedEra era → Script (ShelleyLedgerEra era) → Witness era |
Instances
| Eq (Witness era) Source # | |
| Show (Witness era) Source # | |
| HasTypeProxy era ⇒ HasTypeProxy (Witness era) Source # | |
| IsCardanoEra era ⇒ SerialiseAsCBOR (Witness era) Source # | |
Defined in Cardano.Api.Tx Methods serialiseToCBOR ∷ Witness era → ByteString Source # deserialiseFromCBOR ∷ AsType (Witness era) → ByteString → Either DecoderError (Witness era) Source # | |
| IsCardanoEra era ⇒ HasTextEnvelope (Witness era) Source # | |
Defined in Cardano.Api.Tx Methods textEnvelopeType ∷ AsType (Witness era) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Witness era → TextEnvelopeDescr Source # | |
| data AsType (Witness era) Source # | |
Defined in Cardano.Api.Tx | |
makeByronKeyWitness ∷ ∀ key. IsByronKey key ⇒ NetworkId → TxBody ByronEra → SigningKey key → Witness ByronEra Source #
data ShelleyWitnessSigningKey Source #
Constructors
makeShelleyKeyWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ TxBody era → ShelleyWitnessSigningKey → Witness era Source #
data WitnessNetworkIdOrByronAddress Source #
Either a network ID or a Byron address to be used in constructing a Shelley bootstrap witness.
Constructors
| WitnessNetworkId !NetworkId | Network ID. If this value is used in the construction of a Shelley bootstrap witness,
the result will not consist of a derivation path. If that is required,
specify a |
| WitnessByronAddress !(Address ByronAddr) | Byron address. If this value is used in the construction of a Shelley bootstrap witness, both the network ID and derivation path will be extracted from the address and used in the construction of the witness. |
makeShelleyBootstrapWitness ∷ ∀ era. IsShelleyBasedEra era ⇒ WitnessNetworkIdOrByronAddress → TxBody era → SigningKey ByronKey → Witness era Source #
makeScriptWitness ∷ ∀ era. ScriptInEra era → Witness era Source #
makeShelleySignature ∷ SignableRepresentation tosign ⇒ tosign → ShelleySigningKey → SignedDSIGN StandardCrypto tosign Source #
getShelleyKeyWitnessVerificationKey ∷ ShelleySigningKey → VKey Witness StandardCrypto Source #
Fee calculation
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ Natural | The fixed tx fee |
| → Natural | The tx fee per byte |
| → Tx era | |
| → Lovelace |
For a concrete fully-constructed transaction, determine the minimum fee that it needs to pay.
This function is simple, but if you are doing input selection then you probably want to consider estimateTransactionFee.
estimateTransactionFee Source #
Arguments
| ∷ ∀ era. IsShelleyBasedEra era | |
| ⇒ NetworkId | |
| → Natural | The fixed tx fee |
| → Natural | The tx fee per byte |
| → Tx era | |
| → Int | The number of extra UTxO transaction inputs |
| → Int | The number of extra transaction outputs |
| → Int | The number of extra Shelley key witnesses |
| → Int | The number of extra Byron key witnesses |
| → Lovelace |
This can estimate what the transaction fee will be, based on a starting base transaction, plus the numbers of the additional components of the transaction that may be added.
So for example with wallet coin selection, the base transaction should contain all the things not subject to coin selection (such as script inputs, metadata, withdrawals, certs etc)
Transaction metadata
Embedding additional structured data within transactions.
newtype TxMetadata Source #
Constructors
| TxMetadata (Map Word64 TxMetadataValue) |
Instances
toShelleyMetadata ∷ Map Word64 TxMetadataValue → Map Word64 Metadatum Source #
fromShelleyMetadata ∷ Map Word64 Metadatum → Map Word64 TxMetadataValue Source #
Constructing metadata
data TxMetadataValue Source #
Constructors
| TxMetaNumber Integer | |
| TxMetaBytes ByteString | |
| TxMetaText Text | |
| TxMetaList [TxMetadataValue] | |
| TxMetaMap [(TxMetadataValue, TxMetadataValue)] |
Instances
| Eq TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods (==) ∷ TxMetadataValue → TxMetadataValue → Bool # (/=) ∷ TxMetadataValue → TxMetadataValue → Bool # | |
| Ord TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods compare ∷ TxMetadataValue → TxMetadataValue → Ordering # (<) ∷ TxMetadataValue → TxMetadataValue → Bool # (<=) ∷ TxMetadataValue → TxMetadataValue → Bool # (>) ∷ TxMetadataValue → TxMetadataValue → Bool # (>=) ∷ TxMetadataValue → TxMetadataValue → Bool # | |
| Show TxMetadataValue Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataValue → ShowS # show ∷ TxMetadataValue → String # showList ∷ [TxMetadataValue] → ShowS # | |
Validating metadata
validateTxMetadata ∷ TxMetadata → Either [(Word64, TxMetadataRangeError)] () Source #
Validate transaction metadata. This is for use with existing constructed metadata values, e.g. constructed manually or decoded from CBOR directly.
data TxMetadataRangeError Source #
An error in transaction metadata due to an out-of-range value.
Constructors
| TxMetadataNumberOutOfRange !Integer | The number is outside the maximum range of |
| TxMetadataTextTooLong !Int | The length of a text string metadatum value exceeds the maximum of 64 bytes as UTF8. |
| TxMetadataBytesTooLong !Int | The length of a byte string metadatum value exceeds the maximum of 64 bytes. |
Instances
| Eq TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataRangeError → ShowS # show ∷ TxMetadataRangeError → String # showList ∷ [TxMetadataRangeError] → ShowS # | |
| Error TxMetadataRangeError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
Converstion to/from JSON
data TxMetadataJsonSchema Source #
Tx metadata is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string.
We provide two different mappings between tx metadata and JSON, useful for different purposes:
- A mapping that allows almost any JSON value to be converted into tx metadata. This does not require a specific JSON schema for the input. It does not expose the full representation capability of tx metadata.
- A mapping that exposes the full representation capability of tx metadata, but relies on a specific JSON schema for the input JSON.
In the "no schema" mapping, the idea is that (almost) any JSON can be turned into tx metadata and then converted back, without loss. That is, we can round-trip the JSON.
The subset of JSON supported is all JSON except: * No null or bool values * No floating point, only integers in the range of a 64bit signed integer * A limitation on string lengths
The approach for this mapping is to use whichever representation as tx metadata is most compact. In particular:
- JSON lists and maps represented as CBOR lists and maps
- JSON strings represented as CBOR strings
- JSON hex strings with "0x" prefix represented as CBOR byte strings
- JSON integer numbers represented as CBOR signed or unsigned numbers
- JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.
The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).
In the "detailed schema" mapping, the idea is that we expose the full representation capability of the tx metadata in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any tx metadata can be converted into the JSON and back without loss. That is we can round-trip the tx metadata via the JSON and also round-trip schema-compliant JSON via tx metadata.
Constructors
| TxMetadataJsonNoSchema | Use the "no schema" mapping between JSON and tx metadata as described above. |
| TxMetadataJsonDetailedSchema | Use the "detailed schema" mapping between JSON and tx metadata as described above. |
Instances
| Eq TxMetadataJsonSchema Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataJsonSchema Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonSchema → ShowS # show ∷ TxMetadataJsonSchema → String # showList ∷ [TxMetadataJsonSchema] → ShowS # | |
metadataFromJson ∷ TxMetadataJsonSchema → Value → Either TxMetadataJsonError TxMetadata Source #
Convert a value from JSON into tx metadata, using the given choice of mapping between JSON and tx metadata.
This may fail with a conversion error if the JSON is outside the supported
subset for the chosen mapping. See TxMetadataJsonSchema for the details.
metadataToJson ∷ TxMetadataJsonSchema → TxMetadata → Value Source #
Convert a tx metadata value into JSON , using the given choice of mapping between JSON and tx metadata.
This conversion is total but is not necessarily invertible.
See TxMetadataJsonSchema for the details.
metadataValueToJsonNoSchema ∷ TxMetadataValue → Value Source #
data TxMetadataJsonError Source #
Constructors
| TxMetadataJsonToplevelNotMap | |
| TxMetadataJsonToplevelBadKey !Text | |
| TxMetadataJsonSchemaError !Word64 !Value !TxMetadataJsonSchemaError | |
| TxMetadataRangeError !Word64 !Value !TxMetadataRangeError |
Instances
| Eq TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
| Show TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonError → ShowS # show ∷ TxMetadataJsonError → String # showList ∷ [TxMetadataJsonError] → ShowS # | |
| Error TxMetadataJsonError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
data TxMetadataJsonSchemaError Source #
Constructors
Instances
| Eq TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata | |
| Show TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata Methods showsPrec ∷ Int → TxMetadataJsonSchemaError → ShowS # | |
| Error TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.TxMetadata Methods | |
Registering stake address and delegating
Certificates that are embedded in transactions for registering and unregistering stake address, and for setting the stake pool delegation choice for a stake address.
Registering stake pools
Certificates that are embedded in transactions for registering and retiring stake pools. This includes updating the stake pool parameters.
data StakePoolParameters Source #
Constructors
| StakePoolParameters | |
Instances
| Eq StakePoolParameters Source # | |
Defined in Cardano.Api.Certificate Methods | |
| Show StakePoolParameters Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolParameters → ShowS # show ∷ StakePoolParameters → String # showList ∷ [StakePoolParameters] → ShowS # | |
data StakePoolRelay Source #
Constructors
| StakePoolRelayIp (Maybe IPv4) (Maybe IPv6) (Maybe PortNumber) | One or both of IPv4 & IPv6 |
| StakePoolRelayDnsARecord ByteString (Maybe PortNumber) | An DNS name pointing to a |
| StakePoolRelayDnsSrvRecord ByteString | A DNS name pointing to a |
Instances
| Eq StakePoolRelay Source # | |
Defined in Cardano.Api.Certificate Methods (==) ∷ StakePoolRelay → StakePoolRelay → Bool # (/=) ∷ StakePoolRelay → StakePoolRelay → Bool # | |
| Show StakePoolRelay Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolRelay → ShowS # show ∷ StakePoolRelay → String # showList ∷ [StakePoolRelay] → ShowS # | |
data StakePoolMetadataReference Source #
Constructors
| StakePoolMetadataReference | |
Instances
| Eq StakePoolMetadataReference Source # | |
Defined in Cardano.Api.Certificate | |
| Show StakePoolMetadataReference Source # | |
Defined in Cardano.Api.Certificate Methods showsPrec ∷ Int → StakePoolMetadataReference → ShowS # | |
Stake pool off-chain metadata
data StakePoolMetadata Source #
A representation of the required fields for off-chain stake pool metadata.
Constructors
| StakePoolMetadata | |
Fields
| |
Instances
validateAndHashStakePoolMetadata ∷ ByteString → Either StakePoolMetadataValidationError (StakePoolMetadata, Hash StakePoolMetadata) Source #
Decode and validate the provided JSON-encoded bytes as StakePoolMetadata.
Return the decoded metadata and the hash of the original bytes.
data StakePoolMetadataValidationError Source #
A stake pool metadata validation error.
Constructors
| StakePoolMetadataJsonDecodeError !String | |
| StakePoolMetadataInvalidLengthError | The length of the JSON-encoded stake pool metadata exceeds the maximum. |
Instances
Scripts
Both PaymentCredentials and StakeCredentials can use scripts.
Script languages
data SimpleScriptV1 Source #
The original simple script language which supports
- require a signature from a given key (by verification key hash)
- n-way and combinator
- n-way or combinator
- m-of-n combinator
This version of the language was introduced in the ShelleyEra.
Instances
| HasTypeProxy SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType SimpleScriptV1 Source # Methods proxyToAsType ∷ Proxy SimpleScriptV1 → AsType SimpleScriptV1 Source # | |
| IsSimpleScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script | |
| IsScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data SimpleScriptV2 Source #
The second version of the simple script language. It has all the features
of SimpleScriptV1 plus new atomic predicates:
- require the time be before a given slot number
- require the time be after a given slot number
This version of the language was introduced in the AllegraEra.
Instances
| HasTypeProxy SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Associated Types data AsType SimpleScriptV2 Source # Methods proxyToAsType ∷ Proxy SimpleScriptV2 → AsType SimpleScriptV2 Source # | |
| IsSimpleScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script | |
| IsScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| data AsType SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data ScriptLanguage lang where Source #
Constructors
| SimpleScriptLanguage ∷ SimpleScriptVersion lang → ScriptLanguage lang | |
| PlutusScriptLanguage ∷ PlutusScriptVersion lang → ScriptLanguage lang |
Instances
| Eq (ScriptLanguage lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptLanguage lang → ScriptLanguage lang → Bool # (/=) ∷ ScriptLanguage lang → ScriptLanguage lang → Bool # | |
| Show (ScriptLanguage lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptLanguage lang → ShowS # show ∷ ScriptLanguage lang → String # showList ∷ [ScriptLanguage lang] → ShowS # | |
| TestEquality ScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). ScriptLanguage a → ScriptLanguage b → Maybe (a :~: b) # | |
data SimpleScriptVersion lang where Source #
Constructors
| SimpleScriptV1 ∷ SimpleScriptVersion SimpleScriptV1 | |
| SimpleScriptV2 ∷ SimpleScriptVersion SimpleScriptV2 |
Instances
| Eq (SimpleScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ SimpleScriptVersion lang → SimpleScriptVersion lang → Bool # (/=) ∷ SimpleScriptVersion lang → SimpleScriptVersion lang → Bool # | |
| Show (SimpleScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → SimpleScriptVersion lang → ShowS # show ∷ SimpleScriptVersion lang → String # showList ∷ [SimpleScriptVersion lang] → ShowS # | |
| TestEquality SimpleScriptVersion Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). SimpleScriptVersion a → SimpleScriptVersion b → Maybe (a :~: b) # | |
data PlutusScriptVersion lang Source #
Instances
| Eq (PlutusScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ PlutusScriptVersion lang → PlutusScriptVersion lang → Bool # (/=) ∷ PlutusScriptVersion lang → PlutusScriptVersion lang → Bool # | |
| Show (PlutusScriptVersion lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → PlutusScriptVersion lang → ShowS # show ∷ PlutusScriptVersion lang → String # showList ∷ [PlutusScriptVersion lang] → ShowS # | |
| TestEquality PlutusScriptVersion Source # | |
Defined in Cardano.Api.Script Methods testEquality ∷ ∀ (a ∷ k) (b ∷ k). PlutusScriptVersion a → PlutusScriptVersion b → Maybe (a :~: b) # | |
data AnyScriptLanguage where Source #
Constructors
| AnyScriptLanguage ∷ ScriptLanguage lang → AnyScriptLanguage |
Instances
| Bounded AnyScriptLanguage Source # | |
Defined in Cardano.Api.Script | |
| Enum AnyScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods succ ∷ AnyScriptLanguage → AnyScriptLanguage # pred ∷ AnyScriptLanguage → AnyScriptLanguage # toEnum ∷ Int → AnyScriptLanguage # fromEnum ∷ AnyScriptLanguage → Int # enumFrom ∷ AnyScriptLanguage → [AnyScriptLanguage] # enumFromThen ∷ AnyScriptLanguage → AnyScriptLanguage → [AnyScriptLanguage] # enumFromTo ∷ AnyScriptLanguage → AnyScriptLanguage → [AnyScriptLanguage] # enumFromThenTo ∷ AnyScriptLanguage → AnyScriptLanguage → AnyScriptLanguage → [AnyScriptLanguage] # | |
| Eq AnyScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods | |
| Show AnyScriptLanguage Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → AnyScriptLanguage → ShowS # show ∷ AnyScriptLanguage → String # showList ∷ [AnyScriptLanguage] → ShowS # | |
class HasTypeProxy lang ⇒ IsScriptLanguage lang where Source #
Methods
scriptLanguage ∷ ScriptLanguage lang Source #
Instances
| IsScriptLanguage SimpleScriptV2 Source # | |
Defined in Cardano.Api.Script Methods | |
| IsScriptLanguage SimpleScriptV1 Source # | |
Defined in Cardano.Api.Script Methods | |
Scripts in a specific language
data Script lang where Source #
A script in a particular language.
See also ScriptInAnyLang for a script in any of the languages that is available within
a particular era.
See also ScriptInEra for a script in a language that is available within
a particular era.
Constructors
| SimpleScript ∷ !(SimpleScriptVersion lang) → !(SimpleScript lang) → Script lang | |
| PlutusScript ∷ !(PlutusScriptVersion lang) → () → Script lang |
Instances
| Eq (Script lang) Source # | |
| Show (Script lang) Source # | |
| IsScriptLanguage lang ⇒ FromJSON (Script lang) Source # | |
Defined in Cardano.Api.Script | |
| ToJSON (Script lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ Script lang → Value # toEncoding ∷ Script lang → Encoding # toJSONList ∷ [Script lang] → Value # toEncodingList ∷ [Script lang] → Encoding # | |
| HasTypeProxy lang ⇒ HasTypeProxy (Script lang) Source # | |
| IsScriptLanguage lang ⇒ SerialiseAsCBOR (Script lang) Source # | |
Defined in Cardano.Api.Script Methods serialiseToCBOR ∷ Script lang → ByteString Source # deserialiseFromCBOR ∷ AsType (Script lang) → ByteString → Either DecoderError (Script lang) Source # | |
| IsScriptLanguage lang ⇒ HasTextEnvelope (Script lang) Source # | |
Defined in Cardano.Api.Script Methods textEnvelopeType ∷ AsType (Script lang) → TextEnvelopeType Source # textEnvelopeDefaultDescr ∷ Script lang → TextEnvelopeDescr Source # | |
| data AsType (Script lang) Source # | |
Defined in Cardano.Api.Script | |
Scripts in any language
data ScriptInAnyLang where Source #
Sometimes it is necessary to handle all languages without making static type distinctions between languages. For example, when reading external input, or before the era context is known.
Use toScriptInEra to convert to a script in the context of an era.
Constructors
| ScriptInAnyLang ∷ ScriptLanguage lang → Script lang → ScriptInAnyLang |
Instances
toScriptInAnyLang ∷ Script lang → ScriptInAnyLang Source #
Convert a script in a specific statically-known language to a
ScriptInAnyLang.
No inverse to this is provided, just do case analysis on the ScriptLanguage
field within the ScriptInAnyLang constructor.
Scripts in a specific era
data ScriptInEra era where Source #
Constructors
| ScriptInEra ∷ ScriptLanguageInEra lang era → Script lang → ScriptInEra era |
Instances
toScriptInEra ∷ CardanoEra era → ScriptInAnyLang → Maybe (ScriptInEra era) Source #
Given a target era and a script in some language, check if the language is
supported in that era, and if so return a ScriptInEra.
eraOfScriptInEra ∷ ScriptInEra era → ShelleyBasedEra era Source #
Languages supported in each era
data ScriptLanguageInEra lang era where Source #
Constructors
Instances
| Eq (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ ScriptLanguageInEra lang era → ScriptLanguageInEra lang era → Bool # (/=) ∷ ScriptLanguageInEra lang era → ScriptLanguageInEra lang era → Bool # | |
| Show (ScriptLanguageInEra lang era) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptLanguageInEra lang era → ShowS # show ∷ ScriptLanguageInEra lang era → String # showList ∷ [ScriptLanguageInEra lang era] → ShowS # | |
scriptLanguageSupportedInEra ∷ CardanoEra era → ScriptLanguage lang → Maybe (ScriptLanguageInEra lang era) Source #
Check if a given script language is supported in a given era, and if so return the evidence.
languageOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ScriptLanguage lang Source #
eraOfScriptLanguageInEra ∷ ScriptLanguageInEra lang era → ShelleyBasedEra era Source #
Simple scripts
Making multi-signature and time-lock scripts.
data SimpleScript lang where Source #
Constructors
| RequireSignature ∷ !(Hash PaymentKey) → SimpleScript lang | |
| RequireTimeBefore ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang | |
| RequireTimeAfter ∷ !(TimeLocksSupported lang) → !SlotNo → SimpleScript lang | |
| RequireAllOf ∷ [SimpleScript lang] → SimpleScript lang | |
| RequireAnyOf ∷ [SimpleScript lang] → SimpleScript lang | |
| RequireMOf ∷ Int → [SimpleScript lang] → SimpleScript lang |
Instances
| Eq (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ SimpleScript lang → SimpleScript lang → Bool # (/=) ∷ SimpleScript lang → SimpleScript lang → Bool # | |
| Show (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → SimpleScript lang → ShowS # show ∷ SimpleScript lang → String # showList ∷ [SimpleScript lang] → ShowS # | |
| IsSimpleScriptLanguage lang ⇒ FromJSON (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods parseJSON ∷ Value → Parser (SimpleScript lang) # parseJSONList ∷ Value → Parser [SimpleScript lang] # | |
| ToJSON (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ SimpleScript lang → Value # toEncoding ∷ SimpleScript lang → Encoding # toJSONList ∷ [SimpleScript lang] → Value # toEncodingList ∷ [SimpleScript lang] → Encoding # | |
data TimeLocksSupported lang where Source #
Time lock feature in the SimpleScript language.
The constructors of this type serve as evidence that the timelocks feature is supported in particular versions of the language.
Constructors
| TimeLocksInSimpleScriptV2 ∷ TimeLocksSupported SimpleScriptV2 |
Instances
| Eq (TimeLocksSupported lang) Source # | |
Defined in Cardano.Api.Script Methods (==) ∷ TimeLocksSupported lang → TimeLocksSupported lang → Bool # (/=) ∷ TimeLocksSupported lang → TimeLocksSupported lang → Bool # | |
| Show (TimeLocksSupported lang) Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → TimeLocksSupported lang → ShowS # show ∷ TimeLocksSupported lang → String # showList ∷ [TimeLocksSupported lang] → ShowS # | |
timeLocksSupported ∷ SimpleScriptVersion lang → Maybe (TimeLocksSupported lang) Source #
adjustSimpleScriptVersion ∷ SimpleScriptVersion lang' → SimpleScript lang → Maybe (SimpleScript lang') Source #
Try converting the SimpleScript into a different version of the language.
This will work when the script only uses the features of the target language
version. For example converting from SimpleScriptV2 to SimpleScriptV1
will work if the script happens not to use time locks feature. On the other
hand converting SimpleScriptV1 to SimpleScriptV2 will always work because
it is backwards compatible.
Script addresses
Making addresses from scripts.
data ScriptHash Source #
We have this type separate from the Hash type to avoid the script
hash type being parametrised by the era. The representation is era
independent, and there are many places where we want to use a script
hash where we don't want things to be era-parametrised.
Instances
| Eq ScriptHash Source # | |
Defined in Cardano.Api.Script | |
| Ord ScriptHash Source # | |
Defined in Cardano.Api.Script Methods compare ∷ ScriptHash → ScriptHash → Ordering # (<) ∷ ScriptHash → ScriptHash → Bool # (<=) ∷ ScriptHash → ScriptHash → Bool # (>) ∷ ScriptHash → ScriptHash → Bool # (>=) ∷ ScriptHash → ScriptHash → Bool # max ∷ ScriptHash → ScriptHash → ScriptHash # min ∷ ScriptHash → ScriptHash → ScriptHash # | |
| Show ScriptHash Source # | |
Defined in Cardano.Api.Script Methods showsPrec ∷ Int → ScriptHash → ShowS # show ∷ ScriptHash → String # showList ∷ [ScriptHash] → ShowS # | |
| IsString ScriptHash Source # | |
Defined in Cardano.Api.Script Methods fromString ∷ String → ScriptHash # | |
| HasTypeProxy ScriptHash Source # | |
Defined in Cardano.Api.Script Associated Types data AsType ScriptHash Source # Methods proxyToAsType ∷ Proxy ScriptHash → AsType ScriptHash Source # | |
| SerialiseAsRawBytes ScriptHash Source # | |
Defined in Cardano.Api.Script | |
| data AsType ScriptHash Source # | |
Defined in Cardano.Api.Script | |
hashScript ∷ Script lang → ScriptHash Source #
Internal conversion functions
toShelleyScript ∷ ScriptInEra era → Script (ShelleyLedgerEra era) Source #
toShelleyMultiSig ∷ SimpleScript SimpleScriptV1 → MultiSig StandardCrypto Source #
Conversion for the MultiSig language used by the Shelley era.
fromShelleyMultiSig ∷ MultiSig StandardCrypto → SimpleScript lang Source #
Conversion for the MultiSig language used by the Shelley era.
toAllegraTimelock ∷ ∀ lang. SimpleScript lang → Timelock StandardCrypto Source #
Conversion for the Timelock language that is shared between the
Allegra and Mary eras.
fromAllegraTimelock ∷ TimeLocksSupported lang → Timelock StandardCrypto → SimpleScript lang Source #
Conversion for the Timelock language that is shared between the
Allegra and Mary eras.
toShelleyScriptHash ∷ ScriptHash → ScriptHash StandardCrypto Source #
fromShelleyScriptHash ∷ ScriptHash StandardCrypto → ScriptHash Source #
Serialisation
Support for serialising data in JSON, CBOR and text files.
CBOR
class HasTypeProxy a ⇒ SerialiseAsCBOR a Source #
Instances
Minimal complete definition
Instances
class Typeable a ⇒ FromCBOR a #
Minimal complete definition
Instances
| FromCBOR Bool | |
| FromCBOR Float | |
| FromCBOR Int | |
| FromCBOR Int32 | |
| FromCBOR Int64 | |
| FromCBOR Integer | |
| FromCBOR Natural | |
| FromCBOR Word | |
| FromCBOR Word8 | |
| FromCBOR Word16 | |
| FromCBOR Word32 | |
| FromCBOR Word64 | |
| FromCBOR () | |
| FromCBOR ByteString | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR ShortByteString | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR Nano | |
| FromCBOR Pico | |
| FromCBOR Void | |
| FromCBOR Text | |
| FromCBOR NominalDiffTime | |
Defined in Cardano.Binary.FromCBOR | |
| FromCBOR LByteString | |
| FromCBOR Raw | |
| FromCBOR Coin | |
| FromCBOR SlotNo | |
| FromCBOR ValidityInterval | |
| FromCBOR DeltaCoin | |
| FromCBOR Desirability | |
| FromCBOR StakePoolRelay | |
| FromCBOR PoolMetadata | |
| FromCBOR Network | |
| FromCBOR UnitInterval | |
| FromCBOR BlockNo | |
| FromCBOR EpochNo | |
| FromCBOR Metadatum | |
| FromCBOR AssetName | |
| FromCBOR ByronHash | |
| FromCBOR KESPeriod | |
| FromCBOR Nonce | |
| FromCBOR ActiveSlotCoeff | |
| FromCBOR EpochAndSlotCount | |
| FromCBOR EpochNumber | |
| FromCBOR EpochSlots | |
Defined in Cardano.Chain.Slotting.EpochSlots | |
| FromCBOR SlotCount | |
| FromCBOR SlotNumber | |
| FromCBOR CompactAddress | |
| FromCBOR ProtocolParameters | |
| FromCBOR ProtocolVersion | |
| FromCBOR ProtocolMagicId | |
| FromCBOR Certificate | |
| FromCBOR SigningKey | |
| FromCBOR SoftwareVersion | |
| FromCBOR VerificationKey | |
| FromCBOR KeyHash | |
| FromCBOR GenesisHash | |
| FromCBOR CandidateProtocolUpdate | |
| FromCBOR Endorsement | |
| FromCBOR ApplyMempoolPayloadErr | |
| FromCBOR Tx | |
| FromCBOR Proposal | |
| FromCBOR Vote | |
| FromCBOR ChainValidationState | |
| FromCBOR Map | |
| FromCBOR ScheduledDelegation | |
| FromCBOR State | |
| FromCBOR UTxO | |
| FromCBOR Error | |
| FromCBOR ToSign | |
| FromCBOR Lovelace | |
| FromCBOR ProtVer | |
| FromCBOR Point | |
| FromCBOR Proof | |
| FromCBOR SignKey | |
| FromCBOR VerKey | |
| FromCBOR RedeemVerificationKey | |
| FromCBOR RedeemSigningKey | |
| FromCBOR ChainDifficulty | |
| FromCBOR Proof | |
| FromCBOR SscPayload | |
| FromCBOR ProposalBody | |
| FromCBOR TxInWitness | |
| FromCBOR Body | |
| FromCBOR TxPayload | |
| FromCBOR Payload | |
| FromCBOR Payload | |
| FromCBOR BlockSignature | |
| FromCBOR TxProof | |
| FromCBOR SscProof | |
| FromCBOR CompactTxIn | |
| FromCBOR CompactTxOut | |
| FromCBOR State | |
| FromCBOR UTxOValidationError | |
| FromCBOR BlockCount | |
| FromCBOR ApplicationName | |
| FromCBOR ApplicationVersion | |
| FromCBOR ProtocolUpdateProposal | |
| FromCBOR SoftwareUpdateProposal | |
| FromCBOR Error | |
| FromCBOR HDAddressPayload | |
| FromCBOR NetworkMagic | |
| FromCBOR AddrSpendingData | |
| FromCBOR AddrType | |
| FromCBOR Address | |
| FromCBOR Address' | |
| FromCBOR LovelaceError | |
| FromCBOR LovelacePortion | |
| FromCBOR TxFeePolicy | |
| FromCBOR TxSizeLinear | |
| FromCBOR State | |
| FromCBOR State | |
| FromCBOR CompactTxId | |
| FromCBOR TxIn | |
| FromCBOR TxOut | |
| FromCBOR TxAux | |
| FromCBOR TxSigData | |
| FromCBOR UTxOError | |
| FromCBOR ApplicationNameError | |
| FromCBOR InstallerHash | |
| FromCBOR SystemTag | |
| FromCBOR ProtocolParametersUpdate | |
| FromCBOR SoftforkRule | |
| FromCBOR SoftwareVersionError | |
| FromCBOR SystemTagError | |
| FromCBOR Error | |
| FromCBOR Error | |
| FromCBOR Error | |
| FromCBOR Adopted | |
| FromCBOR TicknState | |
| FromCBOR Ptr | |
| FromCBOR ChainCode | |
| FromCBOR DnsName | |
| FromCBOR Port | |
| FromCBOR Url | |
| FromCBOR AccountState | |
| FromCBOR Likelihood | |
| FromCBOR LogWeight | |
| FromCBOR PerformanceEstimate | |
| FromCBOR MIRPot | |
| FromCBOR VotingPeriod | |
| FromCBOR TxValidationError | |
| FromCBOR UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
| FromCBOR Certificate Source # | |
Defined in Cardano.Api.Certificate | |
| FromCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods fromCBOR ∷ Decoder s OperationalCertificateIssueCounter # | |
| FromCBOR OperationalCertificate Source # | |
Defined in Cardano.Api.OperationalCertificate | |
| FromCBOR a ⇒ FromCBOR [a] | |
| FromCBOR a ⇒ FromCBOR (Maybe a) | |
| (Integral a, FromCBOR a) ⇒ FromCBOR (Ratio a) | |
| (Ord a, FromCBOR a) ⇒ FromCBOR (Set a) | |
| FromCBOR a ⇒ FromCBOR (NonEmpty a) | |
| FromCBOR a ⇒ FromCBOR (Vector a) | |
| FamsFrom era ⇒ FromCBOR (Annotator (TxBody era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (BHeader crypto)) | |
| (Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Annotator (AuxiliaryData era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (Timelock crypto)) | |
| (BlockAnn era, ToCBOR (TxBody era), ToCBOR (AuxiliaryData era), ValidateScript era) ⇒ FromCBOR (Annotator (Block era)) | |
| (UsesTxBody era, ValidateScript era, FromCBOR (Annotator (Script era)), FromCBOR (Annotator (AuxiliaryData era))) ⇒ FromCBOR (Annotator (Tx era)) | |
| FromCBOR (Annotator Metadata) | |
| Crypto crypto ⇒ FromCBOR (Annotator (MultiSig crypto)) | |
| (Era era, TransTxBody FromCBOR era) ⇒ FromCBOR (Annotator (TxBody era)) | |
| ShelleyBasedEra era ⇒ FromCBOR (Annotator (Header (ShelleyBlock era))) | |
| ShelleyBasedEra era ⇒ FromCBOR (Annotator (ShelleyBlock era)) | |
| (Typeable t, FromCBOR (Annotator t)) ⇒ FromCBOR (Annotator (MemoBytes t)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (TimelockRaw crypto)) | |
| (Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Annotator (AuxiliaryDataRaw era)) | |
| (Typeable kr, Crypto crypto) ⇒ FromCBOR (Annotator (WitVKey kr crypto)) | |
| FamsFrom era ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (BootstrapWitness crypto)) | |
| (Era era, BlockAnn era, ToCBOR (TxBody era), ToCBOR (AuxiliaryData era), ValidateScript era) ⇒ FromCBOR (Annotator (LaxBlock era)) | |
| Crypto crypto ⇒ FromCBOR (Annotator (MultiSigRaw crypto)) | |
| (TransTxBody FromCBOR era, Era era) ⇒ FromCBOR (Annotator (TxBodyRaw era)) | |
| FromCBOR (SigDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (SigDSIGN Ed25519Bip32DSIGN) # | |
| FromCBOR (SigDSIGN Ed25519DSIGN) | |
| FromCBOR (SigDSIGN MockDSIGN) | |
| FromCBOR (SigDSIGN Ed448DSIGN) | |
| FromCBOR (SignKeyDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed25519Bip32DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed25519Bip32DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN Ed25519DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed25519 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed25519DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed25519DSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN MockDSIGN) | |
Defined in Cardano.Crypto.DSIGN.Mock Methods fromCBOR ∷ Decoder s (SignKeyDSIGN MockDSIGN) # label ∷ Proxy (SignKeyDSIGN MockDSIGN) → Text # | |
| FromCBOR (SignKeyDSIGN Ed448DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed448 Methods fromCBOR ∷ Decoder s (SignKeyDSIGN Ed448DSIGN) # label ∷ Proxy (SignKeyDSIGN Ed448DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed25519Bip32DSIGN) Source # | |
Defined in Cardano.Api.Crypto.Ed25519Bip32 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed25519Bip32DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed25519Bip32DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN Ed25519DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed25519 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed25519DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed25519DSIGN) → Text # | |
| FromCBOR (VerKeyDSIGN MockDSIGN) | |
Defined in Cardano.Crypto.DSIGN.Mock | |
| FromCBOR (VerKeyDSIGN Ed448DSIGN) | |
Defined in Cardano.Crypto.DSIGN.Ed448 Methods fromCBOR ∷ Decoder s (VerKeyDSIGN Ed448DSIGN) # label ∷ Proxy (VerKeyDSIGN Ed448DSIGN) → Text # | |
| Era era ⇒ FromCBOR (PPUPState era) | |
| FromCBOR (CompactForm Coin) | |
| Crypto crypto ⇒ FromCBOR (CompactForm (Value crypto)) | |
| (Typeable era, TransEpoch FromCBOR era) ⇒ FromCBOR (NewEpochState era) | |
| (Era era, TransTxOut DecodeNonNegative era) ⇒ FromCBOR (TxOut era) | |
| (ShelleyBased era, FromCBOR (PredicateFailure (EraRule "LEDGERS" era))) ⇒ FromCBOR (ApplyTxError era) | |
| (Era era, TransLedgerState FromCBOR era) ⇒ FromCBOR (LedgerState era) | |
| (ShelleyBased era, FromCBOR (PredicateFailure (EraRule "LEDGER" era))) ⇒ FromCBOR (LedgersPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (ChainDepState crypto) | |
| Crypto crypto ⇒ FromCBOR (Value crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardProvenance crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardProvenancePool crypto) | |
| Crypto crypto ⇒ FromCBOR (PoolParams crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardAcnt crypto) | |
| Crypto crypto ⇒ FromCBOR (BlocksMade crypto) | |
| FromCBOR a ⇒ FromCBOR (StrictMaybe a) | |
| (Serialise t, Typeable t) ⇒ FromCBOR (WithOrigin t) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SigKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SigKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (SigKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (SigKES (SimpleKES d t)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (VerKeyKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (VerKeyKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (VerKeyKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (VerKeyKES (SimpleKES d t)) | |
| DSIGNAlgorithm d ⇒ FromCBOR (SignKeyKES (SingleKES d)) | |
| (KESAlgorithm d, HashAlgorithm h, Typeable d) ⇒ FromCBOR (SignKeyKES (SumKES h d)) | |
| KnownNat t ⇒ FromCBOR (SignKeyKES (MockKES t)) | |
| (DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat (SeedSizeDSIGN d * t)) ⇒ FromCBOR (SignKeyKES (SimpleKES d t)) | |
| Crypto crypto ⇒ FromCBOR (BHBody crypto) | |
| Crypto crypto ⇒ FromCBOR (Addr crypto) | |
| Crypto crypto ⇒ FromCBOR (CompactAddr crypto) | |
| Crypto crypto ⇒ FromCBOR (AuxiliaryDataHash crypto) | |
| Crypto crypto ⇒ FromCBOR (ScriptHash crypto) | |
| Crypto crypto ⇒ FromCBOR (CompactValue crypto) | |
| Crypto crypto ⇒ FromCBOR (PolicyID crypto) | |
| Crypto c ⇒ FromCBOR (ShelleyHash c) | |
| Era era ⇒ FromCBOR (CompactGenesis era) | |
| FromCBOR (SignKeyVRF PraosVRF) | |
| FromCBOR (SignKeyVRF MockVRF) | |
| FromCBOR (SignKeyVRF SimpleVRF) | |
| FromCBOR (VerKeyVRF PraosVRF) | |
| FromCBOR (VerKeyVRF MockVRF) | |
| FromCBOR (VerKeyVRF SimpleVRF) | |
| Crypto crypto ⇒ FromCBOR (PrtclState crypto) | |
| Typeable v ⇒ FromCBOR (OutputVRF v) | |
| Era era ⇒ FromCBOR (ShelleyGenesis era) | |
Defined in Shelley.Spec.Ledger.Genesis | |
| Crypto crypto ⇒ FromCBOR (ShelleyGenesisStaking crypto) | |
| Crypto crypto ⇒ FromCBOR (GenDelegPair crypto) | |
Defined in Shelley.Spec.Ledger.Keys | |
| Era era ⇒ FromCBOR (PParams era) | |
| FromCBOR (ATxAux ByteSpan) | |
| FromCBOR (ACertificate ByteSpan) | |
| FromCBOR (AProposal ByteSpan) | |
| FromCBOR (AVote ByteSpan) | |
| Era era ⇒ FromCBOR (PParamsUpdate era) | |
Defined in Shelley.Spec.Ledger.PParams | |
| Crypto crypto ⇒ FromCBOR (PrevHash crypto) | |
| Crypto crypto ⇒ FromCBOR (HashHeader crypto) | |
| TransEpoch FromCBOR era ⇒ FromCBOR (EpochState era) | |
| (TransValue FromCBOR era, TransUTxOState FromCBOR era) ⇒ FromCBOR (UTxOState era) | |
| Crypto crypto ⇒ FromCBOR (DPState crypto) | |
| Crypto crypto ⇒ FromCBOR (SnapShots crypto) | |
| Crypto crypto ⇒ FromCBOR (NonMyopic crypto) | |
| Crypto crypto ⇒ FromCBOR (RewardUpdate crypto) | |
| Crypto crypto ⇒ FromCBOR (PoolDistr crypto) | |
| Era era ⇒ FromCBOR (ProposedPPUpdates era) | |
| (TransUTxO FromCBOR era, Era era) ⇒ FromCBOR (UTxO era) | |
| Era era ⇒ FromCBOR (Update era) | |
| Crypto crypto ⇒ FromCBOR (TxIn crypto) | |
| Crypto crypto ⇒ FromCBOR (TxId crypto) | |
| Crypto crypto ⇒ FromCBOR (IndividualPoolStake crypto) | |
| FromCBOR (CertVRF PraosVRF) | |
| FromCBOR (CertVRF MockVRF) | |
| FromCBOR (CertVRF SimpleVRF) | |
| Typeable a ⇒ FromCBOR (RedeemSignature a) | |
| Typeable a ⇒ FromCBOR (Signature a) | |
| FromCBOR (ABody ByteSpan) | |
| FromCBOR (APayload ByteSpan) | |
| FromCBOR (ABlockSignature ByteSpan) | |
| FromCBOR (ATxPayload ByteSpan) | |
| FromCBOR (APayload ByteSpan) | |
| FromCBOR (Attributes ()) | |
| FromCBOR (Attributes AddrAttributes) | |
| FromCBOR a ⇒ FromCBOR (MerkleRoot a) | |
| (FromCBOR a, ToCBOR a) ⇒ FromCBOR (MerkleTree a) | |
| FromCBOR n ⇒ FromCBOR (TooLarge n) | |
| (TransValue FromCBOR era, TransUTxOState FromCBOR era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| Era era ⇒ FromCBOR (PpupPredicateFailure era) | |
| Crypto crypto ⇒ FromCBOR (DCert crypto) | |
| Crypto crypto ⇒ FromCBOR (Wdrl crypto) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "UTXO" era)), Typeable (Script era), Typeable (AuxiliaryData era)) ⇒ FromCBOR (UtxowPredicateFailure era) | |
| FamsFrom era ⇒ FromCBOR (TxBodyRaw era) | |
| Crypto crypto ⇒ FromCBOR (GenDelegs crypto) | |
| Crypto crypto ⇒ FromCBOR (HashBBody crypto) | |
| Crypto crypto ⇒ FromCBOR (LastAppliedBlock crypto) | |
| (FromCBORGroup a, ToCBORGroup a) ⇒ FromCBOR (CBORGroup a) | |
| Crypto crypto ⇒ FromCBOR (MIRCert crypto) | |
| Crypto crypto ⇒ FromCBOR (StakeCreds crypto) | |
| Crypto crypto ⇒ FromCBOR (SnapShot crypto) | |
| Crypto crypto ⇒ FromCBOR (Stake crypto) | |
| Crypto crypto ⇒ FromCBOR (DState crypto) | |
| Crypto crypto ⇒ FromCBOR (FutureGenDeleg crypto) | |
| Crypto crypto ⇒ FromCBOR (InstantaneousRewards crypto) | |
| Crypto crypto ⇒ FromCBOR (PState crypto) | |
| Crypto crypto ⇒ FromCBOR (OBftSlot crypto) | |
| (Era era, Typeable (Script era)) ⇒ FromCBOR (DelegPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "DELPL" era)), Typeable (Script era)) ⇒ FromCBOR (DelegsPredicateFailure era) | |
| (Era era, FromCBOR (PredicateFailure (EraRule "POOL" era)), FromCBOR (PredicateFailure (EraRule "DELEG" era)), Typeable (Script era)) ⇒ FromCBOR (DelplPredicateFailure era) | |
| Era era ⇒ FromCBOR (PoolPredicateFailure era) | |
| (FromCBOR (PredicateFailure (EraRule "DELEGS" era)), FromCBOR (PredicateFailure (EraRule "UTXOW" era)), Era era) ⇒ FromCBOR (LedgerPredicateFailure era) | |
| (TransValue FromCBOR era, TransUTxOState FromCBOR era, DecodeNonNegative (Value era), Show (Value era), FromCBOR (PredicateFailure (EraRule "PPUP" era))) ⇒ FromCBOR (UtxoPredicateFailure era) | |
| (TransTxBody FromCBOR era, Era era) ⇒ FromCBOR (TxBodyRaw era) | |
| FromCBOR (VerificationKey StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakePoolKey) # label ∷ Proxy (VerificationKey StakePoolKey) → Text # | |
| FromCBOR (VerificationKey GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisUTxOKey) # label ∷ Proxy (VerificationKey GenesisUTxOKey) → Text # | |
| FromCBOR (VerificationKey GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisDelegateExtendedKey) # label ∷ Proxy (VerificationKey GenesisDelegateExtendedKey) → Text # | |
| FromCBOR (VerificationKey GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisDelegateKey) # | |
| FromCBOR (VerificationKey GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisExtendedKey) # | |
| FromCBOR (VerificationKey GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey GenesisKey) # label ∷ Proxy (VerificationKey GenesisKey) → Text # | |
| FromCBOR (VerificationKey StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakeExtendedKey) # | |
| FromCBOR (VerificationKey StakeKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey StakeKey) # | |
| FromCBOR (VerificationKey PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey PaymentExtendedKey) # | |
| FromCBOR (VerificationKey PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (VerificationKey PaymentKey) # label ∷ Proxy (VerificationKey PaymentKey) → Text # | |
| FromCBOR (VerificationKey VrfKey) Source # | |
Defined in Cardano.Api.KeysPraos Methods fromCBOR ∷ Decoder s (VerificationKey VrfKey) # | |
| FromCBOR (VerificationKey KesKey) Source # | |
Defined in Cardano.Api.KeysPraos Methods fromCBOR ∷ Decoder s (VerificationKey KesKey) # | |
| FromCBOR (VerificationKey ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (VerificationKey ByronKeyLegacy) # label ∷ Proxy (VerificationKey ByronKeyLegacy) → Text # | |
| FromCBOR (VerificationKey ByronKey) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (VerificationKey ByronKey) # | |
| FromCBOR (SigningKey StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey StakePoolKey) # label ∷ Proxy (SigningKey StakePoolKey) → Text # | |
| FromCBOR (SigningKey GenesisUTxOKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisUTxOKey) # label ∷ Proxy (SigningKey GenesisUTxOKey) → Text # | |
| FromCBOR (SigningKey GenesisDelegateExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisDelegateExtendedKey) # label ∷ Proxy (SigningKey GenesisDelegateExtendedKey) → Text # | |
| FromCBOR (SigningKey GenesisDelegateKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisDelegateKey) # label ∷ Proxy (SigningKey GenesisDelegateKey) → Text # | |
| FromCBOR (SigningKey GenesisExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey GenesisExtendedKey) # label ∷ Proxy (SigningKey GenesisExtendedKey) → Text # | |
| FromCBOR (SigningKey GenesisKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey StakeExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey StakeExtendedKey) # label ∷ Proxy (SigningKey StakeExtendedKey) → Text # | |
| FromCBOR (SigningKey StakeKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey PaymentExtendedKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods fromCBOR ∷ Decoder s (SigningKey PaymentExtendedKey) # label ∷ Proxy (SigningKey PaymentExtendedKey) → Text # | |
| FromCBOR (SigningKey PaymentKey) Source # | |
Defined in Cardano.Api.KeysShelley | |
| FromCBOR (SigningKey VrfKey) Source # | |
Defined in Cardano.Api.KeysPraos | |
| FromCBOR (SigningKey KesKey) Source # | |
Defined in Cardano.Api.KeysPraos | |
| FromCBOR (SigningKey ByronKeyLegacy) Source # | |
Defined in Cardano.Api.KeysByron Methods fromCBOR ∷ Decoder s (SigningKey ByronKeyLegacy) # label ∷ Proxy (SigningKey ByronKeyLegacy) → Text # | |
| FromCBOR (SigningKey ByronKey) Source # | |
Defined in Cardano.Api.KeysByron | |
| FromCBOR a ⇒ FromCBOR (CborSeq a) | |
| (FromCBOR a, FromCBOR b) ⇒ FromCBOR (Either a b) | |
| (FromCBOR a, FromCBOR b) ⇒ FromCBOR (a, b) | |
| (Ord k, FromCBOR k, FromCBOR v) ⇒ FromCBOR (Map k v) | |
| (HashAlgorithm h, Typeable a) ⇒ FromCBOR (Hash h a) | |
| (Typeable kr, Crypto crypto) ⇒ FromCBOR (Credential kr crypto) | |
| (Crypto crypto, Typeable disc) ⇒ FromCBOR (KeyHash disc crypto) | |
| (Crypto crypto, Typeable kd) ⇒ FromCBOR (VKey kd crypto) | |
| (VRFAlgorithm v, Typeable a) ⇒ FromCBOR (CertifiedVRF v a) | |
| (Typeable algo, Typeable a, HashAlgorithm algo) ⇒ FromCBOR (AbstractHash algo a) | |
| (FromCBOR a, FromCBOR b, FromCBOR c) ⇒ FromCBOR (a, b, c) | |
| (Typeable s, FromCBOR a) ⇒ FromCBOR (Tagged s a) | |
| (Ord a, Ord b, FromCBOR a, FromCBOR b) ⇒ FromCBOR (BiMap b a b) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d) ⇒ FromCBOR (a, b, c, d) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e) ⇒ FromCBOR (a, b, c, d, e) | |
| (FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g) ⇒ FromCBOR (a, b, c, d, e, f, g) | |
serialiseToCBOR ∷ SerialiseAsCBOR a ⇒ a → ByteString Source #
deserialiseFromCBOR ∷ SerialiseAsCBOR a ⇒ AsType a → ByteString → Either DecoderError a Source #
JSON
Instances
| ToJSON Bool | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Bool → Encoding # toJSONList ∷ [Bool] → Value # toEncodingList ∷ [Bool] → Encoding # | |
| ToJSON Char | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Char → Encoding # toJSONList ∷ [Char] → Value # toEncodingList ∷ [Char] → Encoding # | |
| ToJSON Double | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Double → Encoding # toJSONList ∷ [Double] → Value # toEncodingList ∷ [Double] → Encoding # | |
| ToJSON Float | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Float → Encoding # toJSONList ∷ [Float] → Value # toEncodingList ∷ [Float] → Encoding # | |
| ToJSON Int | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Int8 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int8 → Encoding # toJSONList ∷ [Int8] → Value # toEncodingList ∷ [Int8] → Encoding # | |
| ToJSON Int16 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int16 → Encoding # toJSONList ∷ [Int16] → Value # toEncodingList ∷ [Int16] → Encoding # | |
| ToJSON Int32 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int32 → Encoding # toJSONList ∷ [Int32] → Value # toEncodingList ∷ [Int32] → Encoding # | |
| ToJSON Int64 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Int64 → Encoding # toJSONList ∷ [Int64] → Value # toEncodingList ∷ [Int64] → Encoding # | |
| ToJSON Integer | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Integer → Encoding # toJSONList ∷ [Integer] → Value # toEncodingList ∷ [Integer] → Encoding # | |
| ToJSON Natural | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Natural → Encoding # toJSONList ∷ [Natural] → Value # toEncodingList ∷ [Natural] → Encoding # | |
| ToJSON Ordering | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Ordering → Encoding # toJSONList ∷ [Ordering] → Value # toEncodingList ∷ [Ordering] → Encoding # | |
| ToJSON Word | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word → Encoding # toJSONList ∷ [Word] → Value # toEncodingList ∷ [Word] → Encoding # | |
| ToJSON Word8 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word8 → Encoding # toJSONList ∷ [Word8] → Value # toEncodingList ∷ [Word8] → Encoding # | |
| ToJSON Word16 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word16 → Encoding # toJSONList ∷ [Word16] → Value # toEncodingList ∷ [Word16] → Encoding # | |
| ToJSON Word32 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word32 → Encoding # toJSONList ∷ [Word32] → Value # toEncodingList ∷ [Word32] → Encoding # | |
| ToJSON Word64 | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Word64 → Encoding # toJSONList ∷ [Word64] → Value # toEncodingList ∷ [Word64] → Encoding # | |
| ToJSON () | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON Version | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Version → Encoding # toJSONList ∷ [Version] → Value # toEncodingList ∷ [Version] → Encoding # | |
| ToJSON Void | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Void → Encoding # toJSONList ∷ [Void] → Value # toEncodingList ∷ [Void] → Encoding # | |
| ToJSON CTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ CTime → Encoding # toJSONList ∷ [CTime] → Value # toEncodingList ∷ [CTime] → Encoding # | |
| ToJSON IntSet | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ IntSet → Encoding # toJSONList ∷ [IntSet] → Value # toEncodingList ∷ [IntSet] → Encoding # | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Text → Encoding # toJSONList ∷ [Text] → Value # toEncodingList ∷ [Text] → Encoding # | |
| ToJSON Text | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Text → Encoding # toJSONList ∷ [Text] → Value # toEncodingList ∷ [Text] → Encoding # | |
| ToJSON ZonedTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ ZonedTime → Encoding # toJSONList ∷ [ZonedTime] → Value # toEncodingList ∷ [ZonedTime] → Encoding # | |
| ToJSON LocalTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ LocalTime → Encoding # toJSONList ∷ [LocalTime] → Value # toEncodingList ∷ [LocalTime] → Encoding # | |
| ToJSON TimeOfDay | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ TimeOfDay → Encoding # toJSONList ∷ [TimeOfDay] → Value # toEncodingList ∷ [TimeOfDay] → Encoding # | |
| ToJSON CalendarDiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ CalendarDiffTime → Value # toEncoding ∷ CalendarDiffTime → Encoding # toJSONList ∷ [CalendarDiffTime] → Value # toEncodingList ∷ [CalendarDiffTime] → Encoding # | |
| ToJSON UTCTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ UTCTime → Encoding # toJSONList ∷ [UTCTime] → Value # toEncodingList ∷ [UTCTime] → Encoding # | |
| ToJSON SystemTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ SystemTime → Value # toEncoding ∷ SystemTime → Encoding # toJSONList ∷ [SystemTime] → Value # toEncodingList ∷ [SystemTime] → Encoding # | |
| ToJSON NominalDiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ NominalDiffTime → Value # toEncoding ∷ NominalDiffTime → Encoding # toJSONList ∷ [NominalDiffTime] → Value # toEncodingList ∷ [NominalDiffTime] → Encoding # | |
| ToJSON DiffTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DiffTime → Encoding # toJSONList ∷ [DiffTime] → Value # toEncodingList ∷ [DiffTime] → Encoding # | |
| ToJSON DayOfWeek | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DayOfWeek → Encoding # toJSONList ∷ [DayOfWeek] → Value # toEncodingList ∷ [DayOfWeek] → Encoding # | |
| ToJSON Day | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON CalendarDiffDays | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ CalendarDiffDays → Value # toEncoding ∷ CalendarDiffDays → Encoding # toJSONList ∷ [CalendarDiffDays] → Value # toEncodingList ∷ [CalendarDiffDays] → Encoding # | |
| ToJSON ByteSpan | |
Defined in Cardano.Binary.Annotated Methods toEncoding ∷ ByteSpan → Encoding # toJSONList ∷ [ByteSpan] → Value # toEncodingList ∷ [ByteSpan] → Encoding # | |
| ToJSON Number | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Number → Encoding # toJSONList ∷ [Number] → Value # toEncodingList ∷ [Number] → Encoding # | |
| ToJSON Scientific | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Scientific → Encoding # toJSONList ∷ [Scientific] → Value # toEncodingList ∷ [Scientific] → Encoding # | |
| ToJSON DotNetTime | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DotNetTime → Encoding # toJSONList ∷ [DotNetTime] → Value # toEncodingList ∷ [DotNetTime] → Encoding # | |
| ToJSON Value | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON UUID | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ UUID → Encoding # toJSONList ∷ [UUID] → Value # toEncodingList ∷ [UUID] → Encoding # | |
| ToJSON Coin | |
Defined in Shelley.Spec.Ledger.Coin Methods toEncoding ∷ Coin → Encoding # toJSONList ∷ [Coin] → Value # toEncodingList ∷ [Coin] → Encoding # | |
| ToJSON SlotNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ SlotNo → Encoding # toJSONList ∷ [SlotNo] → Value # toEncodingList ∷ [SlotNo] → Encoding # | |
| ToJSON Desirability | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ Desirability → Value # toEncoding ∷ Desirability → Encoding # toJSONList ∷ [Desirability] → Value # toEncodingList ∷ [Desirability] → Encoding # | |
| ToJSON StakePoolRelay | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ StakePoolRelay → Value # toEncoding ∷ StakePoolRelay → Encoding # toJSONList ∷ [StakePoolRelay] → Value # toEncodingList ∷ [StakePoolRelay] → Encoding # | |
| ToJSON PoolMetadata | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ PoolMetadata → Value # toEncoding ∷ PoolMetadata → Encoding # toJSONList ∷ [PoolMetadata] → Value # toEncodingList ∷ [PoolMetadata] → Encoding # | |
| ToJSON Network | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toEncoding ∷ Network → Encoding # toJSONList ∷ [Network] → Value # toEncodingList ∷ [Network] → Encoding # | |
| ToJSON UnitInterval | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toJSON ∷ UnitInterval → Value # toEncoding ∷ UnitInterval → Encoding # toJSONList ∷ [UnitInterval] → Value # toEncodingList ∷ [UnitInterval] → Encoding # | |
| ToJSON EpochNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochNo → Encoding # toJSONList ∷ [EpochNo] → Value # toEncodingList ∷ [EpochNo] → Encoding # | |
| ToJSON Nonce | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toEncoding ∷ Nonce → Encoding # toJSONList ∷ [Nonce] → Value # toEncodingList ∷ [Nonce] → Encoding # | |
| ToJSON EpochNumber | |
Defined in Cardano.Chain.Slotting.EpochNumber Methods toJSON ∷ EpochNumber → Value # toEncoding ∷ EpochNumber → Encoding # toJSONList ∷ [EpochNumber] → Value # toEncodingList ∷ [EpochNumber] → Encoding # | |
| ToJSON SlotNumber | |
Defined in Cardano.Chain.Slotting.SlotNumber Methods toEncoding ∷ SlotNumber → Encoding # toJSONList ∷ [SlotNumber] → Value # toEncodingList ∷ [SlotNumber] → Encoding # | |
| ToJSON RequiresNetworkMagic | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ RequiresNetworkMagic → Value # toEncoding ∷ RequiresNetworkMagic → Encoding # toJSONList ∷ [RequiresNetworkMagic] → Value # toEncodingList ∷ [RequiresNetworkMagic] → Encoding # | |
| ToJSON ProtocolVersion | |
Defined in Cardano.Chain.Update.ProtocolVersion Methods toJSON ∷ ProtocolVersion → Value # toEncoding ∷ ProtocolVersion → Encoding # toJSONList ∷ [ProtocolVersion] → Value # toEncodingList ∷ [ProtocolVersion] → Encoding # | |
| ToJSON ProtocolMagicId | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ ProtocolMagicId → Value # toEncoding ∷ ProtocolMagicId → Encoding # toJSONList ∷ [ProtocolMagicId] → Value # toEncodingList ∷ [ProtocolMagicId] → Encoding # | |
| ToJSON SoftwareVersion | |
Defined in Cardano.Chain.Update.SoftwareVersion Methods toJSON ∷ SoftwareVersion → Value # toEncoding ∷ SoftwareVersion → Encoding # toJSONList ∷ [SoftwareVersion] → Value # toEncodingList ∷ [SoftwareVersion] → Encoding # | |
| ToJSON VerificationKey | |
Defined in Cardano.Crypto.Signing.VerificationKey Methods toJSON ∷ VerificationKey → Value # toEncoding ∷ VerificationKey → Encoding # toJSONList ∷ [VerificationKey] → Value # toEncodingList ∷ [VerificationKey] → Encoding # | |
| ToJSON GenesisHash | |
Defined in Cardano.Chain.Genesis.Hash Methods toJSON ∷ GenesisHash → Value # toEncoding ∷ GenesisHash → Encoding # toJSONList ∷ [GenesisHash] → Value # toEncodingList ∷ [GenesisHash] → Encoding # | |
| ToJSON Tx | |
Defined in Cardano.Chain.UTxO.Tx | |
| ToJSON ProtocolMagic | |
Defined in Cardano.Crypto.ProtocolMagic Methods toJSON ∷ ProtocolMagic → Value # toEncoding ∷ ProtocolMagic → Encoding # toJSONList ∷ [ProtocolMagic] → Value # toEncodingList ∷ [ProtocolMagic] → Encoding # | |
| ToJSON CompactRedeemVerificationKey | |
Defined in Cardano.Crypto.Signing.Redeem.Compact Methods toJSON ∷ CompactRedeemVerificationKey → Value # toEncoding ∷ CompactRedeemVerificationKey → Encoding # toJSONList ∷ [CompactRedeemVerificationKey] → Value # toEncodingList ∷ [CompactRedeemVerificationKey] → Encoding # | |
| ToJSON Lovelace | |
Defined in Cardano.Chain.Common.Lovelace Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| ToJSON ProtVer | |
Defined in Shelley.Spec.Ledger.PParams Methods toEncoding ∷ ProtVer → Encoding # toJSONList ∷ [ProtVer] → Value # toEncodingList ∷ [ProtVer] → Encoding # | |
| ToJSON ByteString64 | |
Defined in Data.ByteString.Base64.Type Methods toJSON ∷ ByteString64 → Value # toEncoding ∷ ByteString64 → Encoding # toJSONList ∷ [ByteString64] → Value # toEncodingList ∷ [ByteString64] → Encoding # | |
| ToJSON RedeemVerificationKey | |
Defined in Cardano.Crypto.Signing.Redeem.VerificationKey Methods toJSON ∷ RedeemVerificationKey → Value # toEncoding ∷ RedeemVerificationKey → Encoding # toJSONList ∷ [RedeemVerificationKey] → Value # toEncodingList ∷ [RedeemVerificationKey] → Encoding # | |
| ToJSON ChainDifficulty | |
Defined in Cardano.Chain.Common.ChainDifficulty Methods toJSON ∷ ChainDifficulty → Value # toEncoding ∷ ChainDifficulty → Encoding # toJSONList ∷ [ChainDifficulty] → Value # toEncodingList ∷ [ChainDifficulty] → Encoding # | |
| ToJSON Proof | |
Defined in Cardano.Chain.Block.Proof Methods toEncoding ∷ Proof → Encoding # toJSONList ∷ [Proof] → Value # toEncodingList ∷ [Proof] → Encoding # | |
| ToJSON SscPayload | |
Defined in Cardano.Chain.Ssc Methods toEncoding ∷ SscPayload → Encoding # toJSONList ∷ [SscPayload] → Value # toEncodingList ∷ [SscPayload] → Encoding # | |
| ToJSON ProposalBody | |
Defined in Cardano.Chain.Update.Proposal Methods toJSON ∷ ProposalBody → Value # toEncoding ∷ ProposalBody → Encoding # toJSONList ∷ [ProposalBody] → Value # toEncodingList ∷ [ProposalBody] → Encoding # | |
| ToJSON TxInWitness | |
Defined in Cardano.Chain.UTxO.TxWitness Methods toJSON ∷ TxInWitness → Value # toEncoding ∷ TxInWitness → Encoding # toJSONList ∷ [TxInWitness] → Value # toEncodingList ∷ [TxInWitness] → Encoding # | |
| ToJSON TxProof | |
Defined in Cardano.Chain.UTxO.TxProof Methods toEncoding ∷ TxProof → Encoding # toJSONList ∷ [TxProof] → Value # toEncodingList ∷ [TxProof] → Encoding # | |
| ToJSON SscProof | |
Defined in Cardano.Chain.Ssc Methods toEncoding ∷ SscProof → Encoding # toJSONList ∷ [SscProof] → Value # toEncodingList ∷ [SscProof] → Encoding # | |
| ToJSON ApplicationName | |
Defined in Cardano.Chain.Update.ApplicationName Methods toJSON ∷ ApplicationName → Value # toEncoding ∷ ApplicationName → Encoding # toJSONList ∷ [ApplicationName] → Value # toEncodingList ∷ [ApplicationName] → Encoding # | |
| ToJSON AddrAttributes | |
Defined in Cardano.Chain.Common.AddrAttributes Methods toJSON ∷ AddrAttributes → Value # toEncoding ∷ AddrAttributes → Encoding # toJSONList ∷ [AddrAttributes] → Value # toEncodingList ∷ [AddrAttributes] → Encoding # | |
| ToJSON HDAddressPayload | |
Defined in Cardano.Chain.Common.AddrAttributes Methods toJSON ∷ HDAddressPayload → Value # toEncoding ∷ HDAddressPayload → Encoding # toJSONList ∷ [HDAddressPayload] → Value # toEncodingList ∷ [HDAddressPayload] → Encoding # | |
| ToJSON NetworkMagic | |
Defined in Cardano.Chain.Common.NetworkMagic Methods toJSON ∷ NetworkMagic → Value # toEncoding ∷ NetworkMagic → Encoding # toJSONList ∷ [NetworkMagic] → Value # toEncodingList ∷ [NetworkMagic] → Encoding # | |
| ToJSON UnparsedFields | |
Defined in Cardano.Chain.Common.Attributes Methods toJSON ∷ UnparsedFields → Value # toEncoding ∷ UnparsedFields → Encoding # toJSONList ∷ [UnparsedFields] → Value # toEncodingList ∷ [UnparsedFields] → Encoding # | |
| ToJSON AddrType | |
Defined in Cardano.Chain.Common.AddrSpendingData Methods toEncoding ∷ AddrType → Encoding # toJSONList ∷ [AddrType] → Value # toEncodingList ∷ [AddrType] → Encoding # | |
| ToJSON Address | |
Defined in Cardano.Chain.Common.Address Methods toEncoding ∷ Address → Encoding # toJSONList ∷ [Address] → Value # toEncodingList ∷ [Address] → Encoding # | |
| ToJSON LovelacePortion | |
Defined in Cardano.Chain.Common.LovelacePortion Methods toJSON ∷ LovelacePortion → Value # toEncoding ∷ LovelacePortion → Encoding # toJSONList ∷ [LovelacePortion] → Value # toEncodingList ∷ [LovelacePortion] → Encoding # | |
| ToJSON TxFeePolicy | |
Defined in Cardano.Chain.Common.TxFeePolicy Methods toJSON ∷ TxFeePolicy → Value # toEncoding ∷ TxFeePolicy → Encoding # toJSONList ∷ [TxFeePolicy] → Value # toEncodingList ∷ [TxFeePolicy] → Encoding # | |
| ToJSON TxSizeLinear | |
Defined in Cardano.Chain.Common.TxSizeLinear Methods toJSON ∷ TxSizeLinear → Value # toEncoding ∷ TxSizeLinear → Encoding # toJSONList ∷ [TxSizeLinear] → Value # toEncodingList ∷ [TxSizeLinear] → Encoding # | |
| ToJSON TxIn | |
Defined in Cardano.Chain.UTxO.Tx Methods toEncoding ∷ TxIn → Encoding # toJSONList ∷ [TxIn] → Value # toEncodingList ∷ [TxIn] → Encoding # | |
| ToJSON TxOut | |
Defined in Cardano.Chain.UTxO.Tx Methods toEncoding ∷ TxOut → Encoding # toJSONList ∷ [TxOut] → Value # toEncodingList ∷ [TxOut] → Encoding # | |
| ToJSON TxSigData | |
Defined in Cardano.Chain.UTxO.TxWitness Methods toEncoding ∷ TxSigData → Encoding # toJSONList ∷ [TxSigData] → Value # toEncodingList ∷ [TxSigData] → Encoding # | |
| ToJSON InstallerHash | |
Defined in Cardano.Chain.Update.InstallerHash Methods toJSON ∷ InstallerHash → Value # toEncoding ∷ InstallerHash → Encoding # toJSONList ∷ [InstallerHash] → Value # toEncodingList ∷ [InstallerHash] → Encoding # | |
| ToJSON SystemTag | |
Defined in Cardano.Chain.Update.SystemTag Methods toEncoding ∷ SystemTag → Encoding # toJSONList ∷ [SystemTag] → Value # toEncodingList ∷ [SystemTag] → Encoding # | |
| ToJSON ProtocolParametersUpdate | |
Defined in Cardano.Chain.Update.ProtocolParametersUpdate Methods toJSON ∷ ProtocolParametersUpdate → Value # toEncoding ∷ ProtocolParametersUpdate → Encoding # toJSONList ∷ [ProtocolParametersUpdate] → Value # toEncodingList ∷ [ProtocolParametersUpdate] → Encoding # | |
| ToJSON SoftforkRule | |
Defined in Cardano.Chain.Update.SoftforkRule Methods toJSON ∷ SoftforkRule → Value # toEncoding ∷ SoftforkRule → Encoding # toJSONList ∷ [SoftforkRule] → Value # toEncodingList ∷ [SoftforkRule] → Encoding # | |
| ToJSON EpochSize | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochSize → Encoding # toJSONList ∷ [EpochSize] → Value # toEncodingList ∷ [EpochSize] → Encoding # | |
| ToJSON DnsName | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toEncoding ∷ DnsName → Encoding # toJSONList ∷ [DnsName] → Value # toEncodingList ∷ [DnsName] → Encoding # | |
| ToJSON Port | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toEncoding ∷ Port → Encoding # toJSONList ∷ [Port] → Value # toEncodingList ∷ [Port] → Encoding # | |
| ToJSON Url | |
Defined in Shelley.Spec.Ledger.BaseTypes | |
| ToJSON StudentT | |
Defined in Statistics.Distribution.StudentT Methods toEncoding ∷ StudentT → Encoding # toJSONList ∷ [StudentT] → Value # toEncodingList ∷ [StudentT] → Encoding # | |
| ToJSON Month | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Month → Encoding # toJSONList ∷ [Month] → Value # toEncodingList ∷ [Month] → Encoding # | |
| ToJSON Quarter | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Quarter → Encoding # toJSONList ∷ [Quarter] → Value # toEncodingList ∷ [Quarter] → Encoding # | |
| ToJSON QuarterOfYear | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ QuarterOfYear → Value # toEncoding ∷ QuarterOfYear → Encoding # toJSONList ∷ [QuarterOfYear] → Value # toEncodingList ∷ [QuarterOfYear] → Encoding # | |
| ToJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelope → Value # toEncoding ∷ TextEnvelope → Encoding # toJSONList ∷ [TextEnvelope] → Value # toEncodingList ∷ [TextEnvelope] → Encoding # | |
| ToJSON TextEnvelopeDescr Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeDescr → Value # toEncoding ∷ TextEnvelopeDescr → Encoding # toJSONList ∷ [TextEnvelopeDescr] → Value # toEncodingList ∷ [TextEnvelopeDescr] → Encoding # | |
| ToJSON TextEnvelopeType Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelopeType → Value # toEncoding ∷ TextEnvelopeType → Encoding # toJSONList ∷ [TextEnvelopeType] → Value # toEncodingList ∷ [TextEnvelopeType] → Encoding # | |
| ToJSON TxSubmitStatus Source # | |
Defined in Cardano.Api.TxSubmit.Types Methods toJSON ∷ TxSubmitStatus → Value # toEncoding ∷ TxSubmitStatus → Encoding # toJSONList ∷ [TxSubmitStatus] → Value # toEncodingList ∷ [TxSubmitStatus] → Encoding # | |
| ToJSON ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptInAnyLang → Value # toEncoding ∷ ScriptInAnyLang → Encoding # toJSONList ∷ [ScriptInAnyLang] → Value # toEncodingList ∷ [ScriptInAnyLang] → Encoding # | |
| ToJSON ValueNestedRep Source # | |
Defined in Cardano.Api.Value Methods toJSON ∷ ValueNestedRep → Value # toEncoding ∷ ValueNestedRep → Encoding # toJSONList ∷ [ValueNestedRep] → Value # toEncodingList ∷ [ValueNestedRep] → Encoding # | |
| ToJSON Value Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Value → Encoding # toJSONList ∷ [Value] → Value0 # toEncodingList ∷ [Value] → Encoding # | |
| ToJSON AssetName Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ AssetName → Encoding # toJSONList ∷ [AssetName] → Value # toEncodingList ∷ [AssetName] → Encoding # | |
| ToJSON Quantity Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Quantity → Encoding # toJSONList ∷ [Quantity] → Value # toEncodingList ∷ [Quantity] → Encoding # | |
| ToJSON Lovelace Source # | |
Defined in Cardano.Api.Value Methods toEncoding ∷ Lovelace → Encoding # toJSONList ∷ [Lovelace] → Value # toEncodingList ∷ [Lovelace] → Encoding # | |
| ToJSON PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ PraosNonce → Value # toEncoding ∷ PraosNonce → Encoding # toJSONList ∷ [PraosNonce] → Value # toEncodingList ∷ [PraosNonce] → Encoding # | |
| ToJSON ProtocolParameters Source # | |
Defined in Cardano.Api.ProtocolParameters Methods toJSON ∷ ProtocolParameters → Value # toEncoding ∷ ProtocolParameters → Encoding # toJSONList ∷ [ProtocolParameters] → Value # toEncodingList ∷ [ProtocolParameters] → Encoding # | |
| ToJSON a ⇒ ToJSON [a] | |
Defined in Data.Aeson.Types.ToJSON | |
| ToJSON a ⇒ ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Maybe a → Encoding # toJSONList ∷ [Maybe a] → Value # toEncodingList ∷ [Maybe a] → Encoding # | |
| (ToJSON a, Integral a) ⇒ ToJSON (Ratio a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Ratio a → Encoding # toJSONList ∷ [Ratio a] → Value # toEncodingList ∷ [Ratio a] → Encoding # | |
| ToJSON a ⇒ ToJSON (First a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ First a → Encoding # toJSONList ∷ [First a] → Value # toEncodingList ∷ [First a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Last a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Last a → Encoding # toJSONList ∷ [Last a] → Value # toEncodingList ∷ [Last a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Set a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Set a → Encoding # toJSONList ∷ [Set a] → Value # toEncodingList ∷ [Set a] → Encoding # | |
| ToJSON a ⇒ ToJSON (NonEmpty a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ NonEmpty a → Encoding # toJSONList ∷ [NonEmpty a] → Value # toEncodingList ∷ [NonEmpty a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Identity a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Identity a → Encoding # toJSONList ∷ [Identity a] → Value # toEncodingList ∷ [Identity a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Min a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Min a → Encoding # toJSONList ∷ [Min a] → Value # toEncodingList ∷ [Min a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Max a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Max a → Encoding # toJSONList ∷ [Max a] → Value # toEncodingList ∷ [Max a] → Encoding # | |
| ToJSON a ⇒ ToJSON (WrappedMonoid a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ WrappedMonoid a → Value # toEncoding ∷ WrappedMonoid a → Encoding # toJSONList ∷ [WrappedMonoid a] → Value # toEncodingList ∷ [WrappedMonoid a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Option a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Option a → Encoding # toJSONList ∷ [Option a] → Value # toEncodingList ∷ [Option a] → Encoding # | |
| ToJSON a ⇒ ToJSON (First a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ First a → Encoding # toJSONList ∷ [First a] → Value # toEncodingList ∷ [First a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Last a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Last a → Encoding # toJSONList ∷ [Last a] → Value # toEncodingList ∷ [Last a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Dual a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Dual a → Encoding # toJSONList ∷ [Dual a] → Value # toEncodingList ∷ [Dual a] → Encoding # | |
| ToJSON a ⇒ ToJSON (IntMap a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ IntMap a → Encoding # toJSONList ∷ [IntMap a] → Value # toEncodingList ∷ [IntMap a] → Encoding # | |
| ToJSON v ⇒ ToJSON (Tree v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Tree v → Encoding # toJSONList ∷ [Tree v] → Value # toEncodingList ∷ [Tree v] → Encoding # | |
| ToJSON a ⇒ ToJSON (Seq a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Seq a → Encoding # toJSONList ∷ [Seq a] → Value # toEncodingList ∷ [Seq a] → Encoding # | |
| (Vector Vector a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Array a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Array a → Encoding # toJSONList ∷ [Array a] → Value # toEncodingList ∷ [Array a] → Encoding # | |
| ToJSON1 f ⇒ ToJSON (Fix f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Fix f → Encoding # toJSONList ∷ [Fix f] → Value # toEncodingList ∷ [Fix f] → Encoding # | |
| (ToJSON1 f, Functor f) ⇒ ToJSON (Mu f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Mu f → Encoding # toJSONList ∷ [Mu f] → Value # toEncodingList ∷ [Mu f] → Encoding # | |
| (ToJSON1 f, Functor f) ⇒ ToJSON (Nu f) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Nu f → Encoding # toJSONList ∷ [Nu f] → Value # toEncodingList ∷ [Nu f] → Encoding # | |
| ToJSON a ⇒ ToJSON (DNonEmpty a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ DNonEmpty a → Value # toEncoding ∷ DNonEmpty a → Encoding # toJSONList ∷ [DNonEmpty a] → Value # toEncodingList ∷ [DNonEmpty a] → Encoding # | |
| ToJSON a ⇒ ToJSON (DList a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ DList a → Encoding # toJSONList ∷ [DList a] → Value # toEncodingList ∷ [DList a] → Encoding # | |
| (Prim a, ToJSON a) ⇒ ToJSON (PrimArray a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ PrimArray a → Value # toEncoding ∷ PrimArray a → Encoding # toJSONList ∷ [PrimArray a] → Value # toEncodingList ∷ [PrimArray a] → Encoding # | |
| ToJSON a ⇒ ToJSON (SmallArray a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ SmallArray a → Value # toEncoding ∷ SmallArray a → Encoding # toJSONList ∷ [SmallArray a] → Value # toEncodingList ∷ [SmallArray a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Maybe a → Encoding # toJSONList ∷ [Maybe a] → Value # toEncodingList ∷ [Maybe a] → Encoding # | |
| ToJSON a ⇒ ToJSON (HashSet a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ HashSet a → Encoding # toJSONList ∷ [HashSet a] → Value # toEncodingList ∷ [HashSet a] → Encoding # | |
| (Prim a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| (Storable a, ToJSON a) ⇒ ToJSON (Vector a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Vector a → Encoding # toJSONList ∷ [Vector a] → Value # toEncodingList ∷ [Vector a] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardProvenance crypto) | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ RewardProvenance crypto → Value # toEncoding ∷ RewardProvenance crypto → Encoding # toJSONList ∷ [RewardProvenance crypto] → Value # toEncodingList ∷ [RewardProvenance crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (RewardProvenancePool crypto) | |
Defined in Shelley.Spec.Ledger.RewardProvenance Methods toJSON ∷ RewardProvenancePool crypto → Value # toEncoding ∷ RewardProvenancePool crypto → Encoding # toJSONList ∷ [RewardProvenancePool crypto] → Value # toEncodingList ∷ [RewardProvenancePool crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (PoolParams crypto) | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ PoolParams crypto → Value # toEncoding ∷ PoolParams crypto → Encoding # toJSONList ∷ [PoolParams crypto] → Value # toEncodingList ∷ [PoolParams crypto] → Encoding # | |
| ToJSON (RewardAcnt crypto) | |
Defined in Shelley.Spec.Ledger.Address Methods toJSON ∷ RewardAcnt crypto → Value # toEncoding ∷ RewardAcnt crypto → Encoding # toJSONList ∷ [RewardAcnt crypto] → Value # toEncodingList ∷ [RewardAcnt crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (BlocksMade crypto) | |
Defined in Shelley.Spec.Ledger.EpochBoundary Methods toJSON ∷ BlocksMade crypto → Value # toEncoding ∷ BlocksMade crypto → Encoding # toJSONList ∷ [BlocksMade crypto] → Value # toEncodingList ∷ [BlocksMade crypto] → Encoding # | |
| ToJSON a ⇒ ToJSON (StrictMaybe a) | |
Defined in Shelley.Spec.Ledger.BaseTypes Methods toJSON ∷ StrictMaybe a → Value # toEncoding ∷ StrictMaybe a → Encoding # toJSONList ∷ [StrictMaybe a] → Value # toEncodingList ∷ [StrictMaybe a] → Encoding # | |
| ToJSON (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address Methods toJSON ∷ Addr crypto → Value # toEncoding ∷ Addr crypto → Encoding # toJSONList ∷ [Addr crypto] → Value # toEncodingList ∷ [Addr crypto] → Encoding # | |
| ToJSON (ScriptHash crypto) | |
Defined in Shelley.Spec.Ledger.Scripts Methods toJSON ∷ ScriptHash crypto → Value # toEncoding ∷ ScriptHash crypto → Encoding # toJSONList ∷ [ScriptHash crypto] → Value # toEncodingList ∷ [ScriptHash crypto] → Encoding # | |
| ToJSON (Hash StakePoolKey) Source # | |
Defined in Cardano.Api.KeysShelley Methods toJSON ∷ Hash StakePoolKey → Value # toEncoding ∷ Hash StakePoolKey → Encoding # toJSONList ∷ [Hash StakePoolKey] → Value # toEncodingList ∷ [Hash StakePoolKey] → Encoding # | |
| ToJSON a ⇒ ToJSON (AHeader a) | |
Defined in Cardano.Chain.Block.Header Methods toEncoding ∷ AHeader a → Encoding # toJSONList ∷ [AHeader a] → Value # toEncodingList ∷ [AHeader a] → Encoding # | |
| Era era ⇒ ToJSON (ShelleyGenesis era) | |
Defined in Shelley.Spec.Ledger.Genesis Methods toJSON ∷ ShelleyGenesis era → Value # toEncoding ∷ ShelleyGenesis era → Encoding # toJSONList ∷ [ShelleyGenesis era] → Value # toEncodingList ∷ [ShelleyGenesis era] → Encoding # | |
| Crypto crypto ⇒ ToJSON (ShelleyGenesisStaking crypto) | |
Defined in Shelley.Spec.Ledger.Genesis Methods toJSON ∷ ShelleyGenesisStaking crypto → Value # toEncoding ∷ ShelleyGenesisStaking crypto → Encoding # toJSONList ∷ [ShelleyGenesisStaking crypto] → Value # toEncodingList ∷ [ShelleyGenesisStaking crypto] → Encoding # | |
| Crypto crypto ⇒ ToJSON (GenDelegPair crypto) | |
Defined in Shelley.Spec.Ledger.Keys Methods toJSON ∷ GenDelegPair crypto → Value # toEncoding ∷ GenDelegPair crypto → Encoding # toJSONList ∷ [GenDelegPair crypto] → Value # toEncodingList ∷ [GenDelegPair crypto] → Encoding # | |
| ToJSON (PParams era) | |
Defined in Shelley.Spec.Ledger.PParams Methods toJSON ∷ PParams era → Value # toEncoding ∷ PParams era → Encoding # toJSONList ∷ [PParams era] → Value # toEncodingList ∷ [PParams era] → Encoding # | |
| ToJSON a ⇒ ToJSON (ATxAux a) | |
Defined in Cardano.Chain.UTxO.TxAux Methods toEncoding ∷ ATxAux a → Encoding # toJSONList ∷ [ATxAux a] → Value # toEncodingList ∷ [ATxAux a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ACertificate a) | |
Defined in Cardano.Chain.Delegation.Certificate Methods toJSON ∷ ACertificate a → Value # toEncoding ∷ ACertificate a → Encoding # toJSONList ∷ [ACertificate a] → Value # toEncodingList ∷ [ACertificate a] → Encoding # | |
| ToJSON a ⇒ ToJSON (AProposal a) | |
Defined in Cardano.Chain.Update.Proposal Methods toJSON ∷ AProposal a → Value # toEncoding ∷ AProposal a → Encoding # toJSONList ∷ [AProposal a] → Value # toEncodingList ∷ [AProposal a] → Encoding # | |
| ToJSON a ⇒ ToJSON (AVote a) | |
Defined in Cardano.Chain.Update.Vote Methods toEncoding ∷ AVote a → Encoding # toJSONList ∷ [AVote a] → Value # toEncodingList ∷ [AVote a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlockOrBoundary a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABlockOrBoundary a → Value # toEncoding ∷ ABlockOrBoundary a → Encoding # toJSONList ∷ [ABlockOrBoundary a] → Value # toEncodingList ∷ [ABlockOrBoundary a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryHeader a) | |
Defined in Cardano.Chain.Block.Header Methods toJSON ∷ ABoundaryHeader a → Value # toEncoding ∷ ABoundaryHeader a → Encoding # toJSONList ∷ [ABoundaryHeader a] → Value # toEncodingList ∷ [ABoundaryHeader a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryBlock a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABoundaryBlock a → Value # toEncoding ∷ ABoundaryBlock a → Encoding # toJSONList ∷ [ABoundaryBlock a] → Value # toEncodingList ∷ [ABoundaryBlock a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlock a) | |
Defined in Cardano.Chain.Block.Block Methods toEncoding ∷ ABlock a → Encoding # toJSONList ∷ [ABlock a] → Value # toEncodingList ∷ [ABlock a] → Encoding # | |
| ToJSON a ⇒ ToJSON (RedeemSignature a) | |
Defined in Cardano.Crypto.Signing.Redeem.Signature Methods toJSON ∷ RedeemSignature a → Value # toEncoding ∷ RedeemSignature a → Encoding # toJSONList ∷ [RedeemSignature a] → Value # toEncodingList ∷ [RedeemSignature a] → Encoding # | |
| ToJSON (Signature w) | |
Defined in Cardano.Crypto.Signing.Signature Methods toJSON ∷ Signature w → Value # toEncoding ∷ Signature w → Encoding # toJSONList ∷ [Signature w] → Value # toEncodingList ∷ [Signature w] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABoundaryBody a) | |
Defined in Cardano.Chain.Block.Block Methods toJSON ∷ ABoundaryBody a → Value # toEncoding ∷ ABoundaryBody a → Encoding # toJSONList ∷ [ABoundaryBody a] → Value # toEncodingList ∷ [ABoundaryBody a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABody a) | |
Defined in Cardano.Chain.Block.Body Methods toEncoding ∷ ABody a → Encoding # toJSONList ∷ [ABody a] → Value # toEncodingList ∷ [ABody a] → Encoding # | |
| ToJSON a ⇒ ToJSON (APayload a) | |
Defined in Cardano.Chain.Delegation.Payload Methods toEncoding ∷ APayload a → Encoding # toJSONList ∷ [APayload a] → Value # toEncodingList ∷ [APayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ABlockSignature a) | |
Defined in Cardano.Chain.Block.Header Methods toJSON ∷ ABlockSignature a → Value # toEncoding ∷ ABlockSignature a → Encoding # toJSONList ∷ [ABlockSignature a] → Value # toEncodingList ∷ [ABlockSignature a] → Encoding # | |
| ToJSON a ⇒ ToJSON (ATxPayload a) | |
Defined in Cardano.Chain.UTxO.TxPayload Methods toJSON ∷ ATxPayload a → Value # toEncoding ∷ ATxPayload a → Encoding # toJSONList ∷ [ATxPayload a] → Value # toEncodingList ∷ [ATxPayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (APayload a) | |
Defined in Cardano.Chain.Update.Payload Methods toEncoding ∷ APayload a → Encoding # toJSONList ∷ [APayload a] → Value # toEncodingList ∷ [APayload a] → Encoding # | |
| ToJSON a ⇒ ToJSON (Attributes a) | |
Defined in Cardano.Chain.Common.Attributes Methods toJSON ∷ Attributes a → Value # toEncoding ∷ Attributes a → Encoding # toJSONList ∷ [Attributes a] → Value # toEncodingList ∷ [Attributes a] → Encoding # | |
| ToJSON a ⇒ ToJSON (MerkleRoot a) | |
Defined in Cardano.Chain.Common.Merkle Methods toJSON ∷ MerkleRoot a → Value # toEncoding ∷ MerkleRoot a → Encoding # toJSONList ∷ [MerkleRoot a] → Value # toEncodingList ∷ [MerkleRoot a] → Encoding # | |
| ToJSON (StakeCreds crypto) | |
Defined in Shelley.Spec.Ledger.TxBody Methods toJSON ∷ StakeCreds crypto → Value # toEncoding ∷ StakeCreds crypto → Encoding # toJSONList ∷ [StakeCreds crypto] → Value # toEncodingList ∷ [StakeCreds crypto] → Encoding # | |
| ToJSON d ⇒ ToJSON (LinearTransform d) | |
Defined in Statistics.Distribution.Transform Methods toJSON ∷ LinearTransform d → Value # toEncoding ∷ LinearTransform d → Encoding # toJSONList ∷ [LinearTransform d] → Value # toEncodingList ∷ [LinearTransform d] → Encoding # | |
| ToJSON (SimpleScript lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ SimpleScript lang → Value # toEncoding ∷ SimpleScript lang → Encoding # toJSONList ∷ [SimpleScript lang] → Value # toEncodingList ∷ [SimpleScript lang] → Encoding # | |
| ToJSON (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ ScriptInEra era → Value # toEncoding ∷ ScriptInEra era → Encoding # toJSONList ∷ [ScriptInEra era] → Value # toEncodingList ∷ [ScriptInEra era] → Encoding # | |
| ToJSON (Script lang) Source # | |
Defined in Cardano.Api.Script Methods toJSON ∷ Script lang → Value # toEncoding ∷ Script lang → Encoding # toJSONList ∷ [Script lang] → Value # toEncodingList ∷ [Script lang] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Either a b → Encoding # toJSONList ∷ [Either a b] → Value # toEncodingList ∷ [Either a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (a, b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ (a, b) → Encoding # toJSONList ∷ [(a, b)] → Value # toEncodingList ∷ [(a, b)] → Encoding # | |
| (ToJSON v, ToJSONKey k) ⇒ ToJSON (Map k v) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Map k v → Encoding # toJSONList ∷ [Map k v] → Value # toEncodingList ∷ [Map k v] → Encoding # | |
| ToJSON (Proxy a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Proxy a → Encoding # toJSONList ∷ [Proxy a] → Value # toEncodingList ∷ [Proxy a] → Encoding # | |
| HasResolution a ⇒ ToJSON (Fixed a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Fixed a → Encoding # toJSONList ∷ [Fixed a] → Value # toEncodingList ∷ [Fixed a] → Encoding # | |
| ToJSON b ⇒ ToJSON (Annotated b a) | |
Defined in Cardano.Binary.Annotated Methods toJSON ∷ Annotated b a → Value # toEncoding ∷ Annotated b a → Encoding # toJSONList ∷ [Annotated b a] → Value # toEncodingList ∷ [Annotated b a] → Encoding # | |
| ToJSON (Hash crypto a) | |
Defined in Cardano.Crypto.Hash.Class Methods toJSON ∷ Hash crypto a → Value # toEncoding ∷ Hash crypto a → Encoding # toJSONList ∷ [Hash crypto a] → Value # toEncodingList ∷ [Hash crypto a] → Encoding # | |
| (ToJSON v, ToJSONKey k) ⇒ ToJSON (HashMap k v) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ HashMap k v → Value # toEncoding ∷ HashMap k v → Encoding # toJSONList ∷ [HashMap k v] → Value # toEncodingList ∷ [HashMap k v] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Either a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Either a b → Encoding # toJSONList ∷ [Either a b] → Value # toEncodingList ∷ [Either a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (These a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ These a b → Encoding # toJSONList ∷ [These a b] → Value # toEncodingList ∷ [These a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (These a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ These a b → Encoding # toJSONList ∷ [These a b] → Value # toEncodingList ∷ [These a b] → Encoding # | |
| (ToJSON a, ToJSON b) ⇒ ToJSON (Pair a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Pair a b → Encoding # toJSONList ∷ [Pair a b] → Value # toEncodingList ∷ [Pair a b] → Encoding # | |
| ToJSON (Credential kr crypto) | |
Defined in Shelley.Spec.Ledger.Credential Methods toJSON ∷ Credential kr crypto → Value # toEncoding ∷ Credential kr crypto → Encoding # toJSONList ∷ [Credential kr crypto] → Value # toEncodingList ∷ [Credential kr crypto] → Encoding # | |
| ToJSON (KeyHash disc crypto) | |
Defined in Shelley.Spec.Ledger.Keys Methods toJSON ∷ KeyHash disc crypto → Value # toEncoding ∷ KeyHash disc crypto → Encoding # toJSONList ∷ [KeyHash disc crypto] → Value # toEncodingList ∷ [KeyHash disc crypto] → Encoding # | |
| ToJSON (AbstractHash algo a) | |
Defined in Cardano.Crypto.Hashing Methods toJSON ∷ AbstractHash algo a → Value # toEncoding ∷ AbstractHash algo a → Encoding # toJSONList ∷ [AbstractHash algo a] → Value # toEncodingList ∷ [AbstractHash algo a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c) ⇒ ToJSON (a, b, c) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ (a, b, c) → Encoding # toJSONList ∷ [(a, b, c)] → Value # toEncodingList ∷ [(a, b, c)] → Encoding # | |
| ToJSON a ⇒ ToJSON (Const a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Const a b → Encoding # toJSONList ∷ [Const a b] → Value # toEncodingList ∷ [Const a b] → Encoding # | |
| ToJSON b ⇒ ToJSON (Tagged a b) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Tagged a b → Encoding # toJSONList ∷ [Tagged a b] → Value # toEncodingList ∷ [Tagged a b] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (These1 f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ These1 f g a → Value # toEncoding ∷ These1 f g a → Encoding # toJSONList ∷ [These1 f g a] → Value # toEncodingList ∷ [These1 f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d) ⇒ ToJSON (a, b, c, d) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d) → Value # toEncoding ∷ (a, b, c, d) → Encoding # toJSONList ∷ [(a, b, c, d)] → Value # toEncodingList ∷ [(a, b, c, d)] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Product f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ Product f g a → Value # toEncoding ∷ Product f g a → Encoding # toJSONList ∷ [Product f g a] → Value # toEncodingList ∷ [Product f g a] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Sum f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toEncoding ∷ Sum f g a → Encoding # toJSONList ∷ [Sum f g a] → Value # toEncodingList ∷ [Sum f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) ⇒ ToJSON (a, b, c, d, e) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e) → Value # toEncoding ∷ (a, b, c, d, e) → Encoding # toJSONList ∷ [(a, b, c, d, e)] → Value # toEncodingList ∷ [(a, b, c, d, e)] → Encoding # | |
| (ToJSON1 f, ToJSON1 g, ToJSON a) ⇒ ToJSON (Compose f g a) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ Compose f g a → Value # toEncoding ∷ Compose f g a → Encoding # toJSONList ∷ [Compose f g a] → Value # toEncodingList ∷ [Compose f g a] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) ⇒ ToJSON (a, b, c, d, e, f) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f) → Value # toEncoding ∷ (a, b, c, d, e, f) → Encoding # toJSONList ∷ [(a, b, c, d, e, f)] → Value # toEncodingList ∷ [(a, b, c, d, e, f)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) ⇒ ToJSON (a, b, c, d, e, f, g) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g) → Value # toEncoding ∷ (a, b, c, d, e, f, g) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) ⇒ ToJSON (a, b, c, d, e, f, g, h) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) ⇒ ToJSON (a, b, c, d, e, f, g, h, i) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] → Encoding # | |
| (ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) ⇒ ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
Defined in Data.Aeson.Types.ToJSON Methods toJSON ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) → Value # toEncoding ∷ (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) → Encoding # toJSONList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] → Value # toEncodingList ∷ [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] → Encoding # | |
Instances
serialiseToJSON ∷ ToJSON a ⇒ a → ByteString Source #
deserialiseFromJSON ∷ FromJSON a ⇒ AsType a → ByteString → Either JsonDecodeError a Source #
newtype JsonDecodeError Source #
Constructors
| JsonDecodeError String |
Instances
| Eq JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods (==) ∷ JsonDecodeError → JsonDecodeError → Bool # (/=) ∷ JsonDecodeError → JsonDecodeError → Bool # | |
| Show JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods showsPrec ∷ Int → JsonDecodeError → ShowS # show ∷ JsonDecodeError → String # showList ∷ [JsonDecodeError] → ShowS # | |
| Error JsonDecodeError Source # | |
Defined in Cardano.Api.SerialiseJSON Methods | |
readFileJSON ∷ FromJSON a ⇒ AsType a → FilePath → IO (Either (FileError JsonDecodeError) a) Source #
Bech32
class (HasTypeProxy a, SerialiseAsRawBytes a) ⇒ SerialiseAsBech32 a Source #
Minimal complete definition
Instances
serialiseToBech32 ∷ SerialiseAsBech32 a ⇒ a → Text Source #
deserialiseFromBech32 ∷ SerialiseAsBech32 a ⇒ AsType a → Text → Either Bech32DecodeError a Source #
deserialiseAnyOfFromBech32 ∷ ∀ b. [FromSomeType SerialiseAsBech32 b] → Text → Either Bech32DecodeError b Source #
data Bech32DecodeError Source #
Bech32 decoding error.
Constructors
| Bech32DecodingError !DecodingError | There was an error decoding the string as Bech32. |
| Bech32UnexpectedPrefix !Text !(Set Text) | The human-readable prefix in the Bech32-encoded string is not one of the ones expected. |
| Bech32DataPartToBytesError !Text | There was an error in extracting a |
| Bech32DeserialiseFromBytesError !ByteString | There was an error in deserialising the bytes into a value of the expected type. |
| Bech32WrongPrefix !Text !Text | The human-readable prefix in the Bech32-encoded string does not correspond to the prefix that should be used for the payload value. |
Instances
| Eq Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods | |
| Show Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods showsPrec ∷ Int → Bech32DecodeError → ShowS # show ∷ Bech32DecodeError → String # showList ∷ [Bech32DecodeError] → ShowS # | |
| Error Bech32DecodeError Source # | |
Defined in Cardano.Api.SerialiseBech32 Methods | |
Addresses
Address serialisation is (sadly) special
class HasTypeProxy addr ⇒ SerialiseAddress addr Source #
Address serialisation uses different serialisation formats for different kinds of addresses, so it needs its own class.
In particular, Byron addresses are typically formatted in base 58, while Shelley addresses (payment and stake) are formatted using Bech32.
Minimal complete definition
Instances
| SerialiseAddress StakeAddress Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ StakeAddress → Text Source # deserialiseAddress ∷ AsType StakeAddress → Text → Maybe StakeAddress Source # | |
| SerialiseAddress AddressAny Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ AddressAny → Text Source # deserialiseAddress ∷ AsType AddressAny → Text → Maybe AddressAny Source # | |
| IsCardanoEra era ⇒ SerialiseAddress (AddressInEra era) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ AddressInEra era → Text Source # deserialiseAddress ∷ AsType (AddressInEra era) → Text → Maybe (AddressInEra era) Source # | |
| SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address Methods serialiseAddress ∷ Address ShelleyAddr → Text Source # deserialiseAddress ∷ AsType (Address ShelleyAddr) → Text → Maybe (Address ShelleyAddr) Source # | |
| SerialiseAddress (Address ByronAddr) Source # | |
serialiseAddress ∷ SerialiseAddress addr ⇒ addr → Text Source #
deserialiseAddress ∷ SerialiseAddress addr ⇒ AsType addr → Text → Maybe addr Source #
Raw binary
Some types have a natural raw binary format.
class HasTypeProxy a ⇒ SerialiseAsRawBytes a Source #
Minimal complete definition
Instances
serialiseToRawBytes ∷ SerialiseAsRawBytes a ⇒ a → ByteString Source #
deserialiseFromRawBytes ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
deserialiseFromRawBytesHex ∷ SerialiseAsRawBytes a ⇒ AsType a → ByteString → Maybe a Source #
Text envelope
Support for a envelope file format with text headers and a hex-encoded binary payload.
class SerialiseAsCBOR a ⇒ HasTextEnvelope a where Source #
Minimal complete definition
Methods
Instances
data TextEnvelope Source #
A TextEnvelope is a structured envelope for serialised binary values
with an external format with a semi-readable textual format.
It contains a "type" field, e.g. "PublicKeyByron" or "TxSignedShelley" to indicate the type of the encoded data. This is used as a sanity check and to help readers.
It also contains a "title" field which is free-form, and could be used to indicate the role or purpose to a reader.
Constructors
| TextEnvelope | |
Fields | |
Instances
| Eq TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| Show TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods showsPrec ∷ Int → TextEnvelope → ShowS # show ∷ TextEnvelope → String # showList ∷ [TextEnvelope] → ShowS # | |
| FromJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
| ToJSON TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods toJSON ∷ TextEnvelope → Value # toEncoding ∷ TextEnvelope → Encoding # toJSONList ∷ [TextEnvelope] → Value # toEncodingList ∷ [TextEnvelope] → Encoding # | |
data TextEnvelopeType Source #
Instances
data TextEnvelopeDescr Source #
Instances
serialiseToTextEnvelope ∷ ∀ a. HasTextEnvelope a ⇒ Maybe TextEnvelopeDescr → a → TextEnvelope Source #
deserialiseFromTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → TextEnvelope → Either TextEnvelopeError a Source #
data TextEnvelopeError Source #
The errors that the pure TextEnvelope parsing/decoding functions can return.
Constructors
| TextEnvelopeTypeError ![TextEnvelopeType] !TextEnvelopeType | expected, actual |
| TextEnvelopeDecodeError !DecoderError | |
| TextEnvelopeAesonDecodeError !String |
Instances
| Eq TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
| Show TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods showsPrec ∷ Int → TextEnvelopeError → ShowS # show ∷ TextEnvelopeError → String # showList ∷ [TextEnvelopeError] → ShowS # | |
| Error TextEnvelopeError Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope Methods | |
readFileTextEnvelope ∷ HasTextEnvelope a ⇒ AsType a → FilePath → IO (Either (FileError TextEnvelopeError) a) Source #
writeFileTextEnvelope ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ()) Source #
writeFileTextEnvelopeWithOwnerPermissions ∷ HasTextEnvelope a ⇒ FilePath → Maybe TextEnvelopeDescr → a → IO (Either (FileError ()) ()) Source #
readTextEnvelopeFromFile ∷ FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope) Source #
readTextEnvelopeOfTypeFromFile ∷ TextEnvelopeType → FilePath → IO (Either (FileError TextEnvelopeError) TextEnvelope) Source #
Reading one of several key types
data FromSomeType (c ∷ Type → Constraint) b where Source #
Constructors
| FromSomeType ∷ c a ⇒ AsType a → (a → b) → FromSomeType c b |
deserialiseFromTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → TextEnvelope → Either TextEnvelopeError b Source #
readFileTextEnvelopeAnyOf ∷ [FromSomeType HasTextEnvelope b] → FilePath → IO (Either (FileError TextEnvelopeError) b) Source #
Errors
class Show e ⇒ Error e where Source #
Methods
displayError ∷ e → String Source #
Instances
throwErrorAsException ∷ Error e ⇒ e → IO a Source #
The preferred approach is to use Except or ExceptT, but you can if
necessary use IO exceptions.
Constructors
| FileError FilePath e | |
| FileErrorTempFile | |
| FileIOError FilePath IOException | |
Instances
Node interaction
Operations that involve talking to a local Cardano node.
Queries
Submitting transactions
Low level protocol interaction with a Cardano node
connectToLocalNode ∷ ∀ mode block. (ShowProxy block, ShowProxy (ApplyTxErr block), ShowProxy (Query block), ShowProxy (GenTx block), ShowQuery (Query block)) ⇒ LocalNodeConnectInfo mode block → LocalNodeClientProtocols block → IO () Source #
Establish a connection to a node and execute the given set of protocol handlers.
data LocalNodeConnectInfo mode block Source #
Constructors
| LocalNodeConnectInfo | |
Fields | |
Instances
| Show (TxSubmitResultForMode ByronMode) Source # | |
Defined in Cardano.Api.TxSubmit | |
data ShelleyMode Source #
Instances
| Show (TxSubmitResultForMode ShelleyMode) Source # | |
Defined in Cardano.Api.TxSubmit Methods showsPrec ∷ Int → TxSubmitResultForMode ShelleyMode → ShowS # | |
data CardanoMode Source #
Instances
| Show (TxSubmitResultForMode CardanoMode) Source # | |
Defined in Cardano.Api.TxSubmit Methods showsPrec ∷ Int → TxSubmitResultForMode CardanoMode → ShowS # | |
data NodeConsensusMode mode block where Source #
Constructors
| ByronMode ∷ EpochSlots → NodeConsensusMode ByronMode ByronBlockHFC | |
| ShelleyMode ∷ NodeConsensusMode ShelleyMode (ShelleyBlockHFC StandardShelley) | |
| CardanoMode ∷ EpochSlots → NodeConsensusMode CardanoMode (CardanoBlock StandardCrypto) |
data LocalNodeClientProtocols block Source #
Constructors
| LocalNodeClientProtocols | |
Fields
| |
withNodeProtocolClient ∷ NodeConsensusMode mode block → ((SerialiseNodeToClientConstraints block, SupportedNetworkProtocolVersion block) ⇒ ProtocolClient block (BlockProtocol block) → a) → a Source #
Chain sync protocol
newtype ChainSyncClient header point tip (m ∷ Type → Type) a #
Constructors
| ChainSyncClient | |
Fields
| |
Local tx submission
newtype LocalTxSubmissionClient tx reject (m ∷ Type → Type) a #
Constructors
| LocalTxSubmissionClient | |
Fields
| |
submitTxToNodeLocal ∷ ∀ mode block. (ShowProxy block, ShowProxy (ApplyTxErr block), ShowProxy (Query block), ShowProxy (GenTx block), ShowQuery (Query block)) ⇒ LocalNodeConnectInfo mode block → GenTx block → IO (SubmitResult (ApplyTxErr block)) Source #
Local state query
newtype LocalStateQueryClient block point (query ∷ Type → Type) (m ∷ Type → Type) a #
Constructors
| LocalStateQueryClient | |
Fields
| |
queryNodeLocalState ∷ ∀ mode block result. (ShowProxy block, ShowProxy (ApplyTxErr block), ShowProxy (Query block), ShowProxy (GenTx block), ShowQuery (Query block)) ⇒ LocalNodeConnectInfo mode block → (Point block, Query block result) → IO (Either AcquireFailure result) Source #
Establish a connection to a node and execute a single query using the local state query protocol.
Node operation
Support for the steps needed to operate a node, including the operator's offline keys, operational KES and VRF keys, and operational certificates.
Stake pool operator's keys
data StakePoolKey Source #
Instances
type PoolId = Hash StakePoolKey Source #
KES keys
Instances
VRF keys
Instances
Operational certificates
data OperationalCertificate Source #
Constructors
| OperationalCertificate !(OCert StandardCrypto) !(VerificationKey StakePoolKey) |
Instances
data OperationalCertificateIssueCounter Source #
Constructors
| OperationalCertificateIssueCounter !Word64 !(VerificationKey StakePoolKey) |
Instances
| Eq OperationalCertificateIssueCounter Source # | |
| Show OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate | |
| FromCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods fromCBOR ∷ Decoder s OperationalCertificateIssueCounter # | |
| ToCBOR OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Methods toCBOR ∷ OperationalCertificateIssueCounter → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy OperationalCertificateIssueCounter → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [OperationalCertificateIssueCounter] → Size # | |
| HasTypeProxy OperationalCertificateIssueCounter Source # | |
Defined in Cardano.Api.OperationalCertificate Associated Types | |
| SerialiseAsCBOR OperationalCertificateIssueCounter Source # | |
| HasTextEnvelope OperationalCertificateIssueCounter Source # | |
| data AsType OperationalCertificateIssueCounter Source # | |
Constructors
| KESPeriod | |
Fields | |
Instances
| Eq KESPeriod | |
| Ord KESPeriod | |
Defined in Shelley.Spec.Ledger.OCert | |
| Show KESPeriod | |
| Generic KESPeriod | |
| NoThunks KESPeriod | |
| FromCBOR KESPeriod | |
| ToCBOR KESPeriod | |
| type Rep KESPeriod | |
Defined in Shelley.Spec.Ledger.OCert type Rep KESPeriod = D1 ('MetaData "KESPeriod" "Shelley.Spec.Ledger.OCert" "shelley-spec-ledger-0.1.0.0-7440b22137bfc140a8cd17b660ea67aa62feb06158c7e9041ba5ff367237ec16" 'True) (C1 ('MetaCons "KESPeriod" 'PrefixI 'True) (S1 ('MetaSel ('Just "unKESPeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))) | |
data OperationalCertIssueError Source #
Constructors
| OperationalCertKeyMismatch (VerificationKey StakePoolKey) (VerificationKey StakePoolKey) | The stake pool verification key expected for the
Order: pool vkey expected, pool skey supplied |
Instances
| Show OperationalCertIssueError Source # | |
Defined in Cardano.Api.OperationalCertificate Methods showsPrec ∷ Int → OperationalCertIssueError → ShowS # | |
| Error OperationalCertIssueError Source # | |
Defined in Cardano.Api.OperationalCertificate Methods | |
issueOperationalCertificate ∷ VerificationKey KesKey → Either (SigningKey StakePoolKey) (SigningKey GenesisDelegateExtendedKey) → KESPeriod → OperationalCertificateIssueCounter → Either OperationalCertIssueError (OperationalCertificate, OperationalCertificateIssueCounter) Source #
Genesis file
Types and functions needed to inspect or create a genesis file.
data GenesisKey Source #
Instances
data GenesisExtendedKey Source #
Shelley-era genesis keys using extended ed25519 cryptographic keys.
These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey GenesisKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey GenesisKey).
This is a type level tag, used with other interfaces like Key.
Instances
data GenesisDelegateKey Source #
Instances
data GenesisDelegateExtendedKey Source #
Shelley-era genesis keys using extended ed25519 cryptographic keys.
These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.
The extended verification keys can be converted (via castVerificationKey)
to ordinary keys (i.e. VerificationKey GenesisKey) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey GenesisKey).
This is a type level tag, used with other interfaces like Key.
Instances
data GenesisUTxOKey Source #
Instances
genesisUTxOPseudoTxIn ∷ NetworkId → Hash GenesisUTxOKey → TxIn Source #
Compute the TxIn of the initial UTxO pseudo-transaction corresponding
to the given address in the genesis initial funds.
The Shelley initial UTxO is constructed from the sgInitialFunds which
is not a full UTxO but just a map from addresses to coin values.
This gets turned into a UTxO by making a pseudo-transaction for each address,
with the 0th output being the coin value. So to spend from the initial UTxO
we need this same TxIn to use as an input to the spending transaction.
Special transactions
There are various additional things that can be embedded in a transaction for special operations.
makeMIRCertificate ∷ MIRPot → [(StakeCredential, Lovelace)] → Certificate Source #
makeGenesisKeyDelegationCertificate ∷ Hash GenesisKey → Hash GenesisDelegateKey → Hash VrfKey → Certificate Source #
Protocol parameter updates
data UpdateProposal Source #
Constructors
| UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo |
Instances
data ProtocolParametersUpdate Source #
The representation of a change in the ProtocolParameters.
Constructors
| ProtocolParametersUpdate | |
Fields
| |
Instances
Instances
| Enum EpochNo | |
Defined in Cardano.Slotting.Slot | |
| Eq EpochNo | |
| Num EpochNo | |
| Ord EpochNo | |
| Show EpochNo | |
| Generic EpochNo | |
| NoThunks EpochNo | |
| FromCBOR EpochNo | |
| ToCBOR EpochNo | |
| FromJSON EpochNo | |
Defined in Cardano.Slotting.Slot | |
| ToJSON EpochNo | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochNo → Encoding # toJSONList ∷ [EpochNo] → Value # toEncodingList ∷ [EpochNo] → Encoding # | |
| Condense EpochNo | |
Defined in Ouroboros.Consensus.Util.Condense | |
| Serialise EpochNo | |
Defined in Cardano.Slotting.Slot | |
| type Rep EpochNo | |
Defined in Cardano.Slotting.Slot type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-e2258fd540e9b0f326f2acf99f1179af359b3cd0d4a73c3fbc72c8d4df62554a" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
newtype NetworkMagic #
Constructors
| NetworkMagic | |
Fields | |
Instances
| Eq NetworkMagic | |
Defined in Ouroboros.Network.Magic | |
| Show NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods showsPrec ∷ Int → NetworkMagic → ShowS # show ∷ NetworkMagic → String # showList ∷ [NetworkMagic] → ShowS # | |
| Generic NetworkMagic | |
Defined in Ouroboros.Network.Magic Associated Types type Rep NetworkMagic ∷ Type → Type # | |
| NoThunks NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods noThunks ∷ Context → NetworkMagic → IO (Maybe ThunkInfo) wNoThunks ∷ Context → NetworkMagic → IO (Maybe ThunkInfo) | |
| type Rep NetworkMagic | |
Defined in Ouroboros.Network.Magic type Rep NetworkMagic = D1 ('MetaData "NetworkMagic" "Ouroboros.Network.Magic" "ouroboros-network-0.1.0.0-b71b2bfc9ccac26c04f91d9e95399f0fc85a047c9ae8a0b1aab9c1b8d519f6b3" 'True) (C1 ('MetaCons "NetworkMagic" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNetworkMagic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) | |
makeShelleyUpdateProposal ∷ ProtocolParametersUpdate → [Hash GenesisKey] → EpochNo → UpdateProposal Source #
data PraosNonce Source #
Instances
Conversions
fromByronTxIn ∷ TxIn → TxIn Source #
toByronLovelace ∷ Lovelace → Maybe Lovelace Source #
toByronNetworkMagic ∷ NetworkId → NetworkMagic Source #
toByronProtocolMagicId ∷ NetworkId → ProtocolMagicId Source #
toByronRequiresNetworkMagic ∷ NetworkId → RequiresNetworkMagic Source #
toShelleyNetwork ∷ NetworkId → Network Source #
toShelleyPoolParams ∷ StakePoolParameters → PoolParams StandardCrypto Source #
toShelleyStakeAddr ∷ StakeAddress → RewardAcnt StandardCrypto Source #
Constructors
| Addr Network (PaymentCredential crypto) (StakeReference crypto) | |
| AddrBootstrap (BootstrapAddress crypto) |
Instances
| (Crypto era ~ c, Era era, TransValue Show era) ⇒ HasField "address" (TxOut era) (Addr c) | |
Defined in Shelley.Spec.Ledger.TxBody | |
| Eq (Addr crypto) | |
| Ord (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address | |
| Show (Addr crypto) | |
| Generic (Addr crypto) | |
| NFData (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address | |
| NoThunks (Addr crypto) | |
| Crypto crypto ⇒ FromCBOR (Addr crypto) | |
| Crypto crypto ⇒ ToCBOR (Addr crypto) | |
| Crypto crypto ⇒ FromJSON (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address | |
| ToJSON (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address Methods toJSON ∷ Addr crypto → Value # toEncoding ∷ Addr crypto → Encoding # toJSONList ∷ [Addr crypto] → Value # toEncodingList ∷ [Addr crypto] → Encoding # | |
| Crypto crypto ⇒ FromJSONKey (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address Methods fromJSONKey ∷ FromJSONKeyFunction (Addr crypto) fromJSONKeyList ∷ FromJSONKeyFunction [Addr crypto] | |
| ToJSONKey (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address | |
| type Rep (Addr crypto) | |
Defined in Shelley.Spec.Ledger.Address type Rep (Addr crypto) = D1 ('MetaData "Addr" "Shelley.Spec.Ledger.Address" "shelley-spec-ledger-0.1.0.0-7440b22137bfc140a8cd17b660ea67aa62feb06158c7e9041ba5ff367237ec16" 'False) (C1 ('MetaCons "Addr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Network) :*: (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PaymentCredential crypto)) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (StakeReference crypto)))) :+: C1 ('MetaCons "AddrBootstrap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BootstrapAddress crypto)))) | |
Instances
| Enum Coin | |
| Eq Coin | |
| Ord Coin | |
| Show Coin | |
| Generic Coin | |
| Semigroup Coin | |
| Monoid Coin | |
| NFData Coin | |
Defined in Shelley.Spec.Ledger.Coin | |
| NoThunks Coin | |
| FromCBOR Coin | |
| ToCBOR Coin | |
| FromJSON Coin | |
Defined in Shelley.Spec.Ledger.Coin | |
| ToJSON Coin | |
Defined in Shelley.Spec.Ledger.Coin Methods toEncoding ∷ Coin → Encoding # toJSONList ∷ [Coin] → Value # toEncodingList ∷ [Coin] → Encoding # | |
| DecodeNonNegative Coin | |
Defined in Cardano.Ledger.Val Methods decodeNonNegative ∷ Decoder s Coin | |
| Compactible Coin | |
Defined in Shelley.Spec.Ledger.Coin Associated Types data CompactForm Coin | |
| Torsor Coin | |
| DecodeMint Coin | |
Defined in Cardano.Ledger.Val Methods decodeMint ∷ Decoder s Coin | |
| Val Coin | |
Defined in Cardano.Ledger.Val | |
| Abelian Coin | |
Defined in Shelley.Spec.Ledger.Coin | |
| EncodeMint Coin | |
Defined in Cardano.Ledger.Val Methods encodeMint ∷ Coin → Encoding | |
| Group Coin | |
| PartialOrd Coin | |
| GetPolicies Coin crypto | |
Defined in Cardano.Ledger.ShelleyMA.Rules.Utxow Methods getPolicies ∷ Coin → Set (PolicyID crypto) | |
| HasField "txfee" (TxBody era) Coin | |
Defined in Cardano.Ledger.ShelleyMA.TxBody | |
| HasField "txfee" (TxBody era) Coin | |
Defined in Shelley.Spec.Ledger.TxBody | |
| Eq (CompactForm Coin) | |
| Show (CompactForm Coin) | |
| NFData (CompactForm Coin) | |
Defined in Shelley.Spec.Ledger.Coin | |
| NoThunks (CompactForm Coin) | |
| FromCBOR (CompactForm Coin) | |
| ToCBOR (CompactForm Coin) | |
| type Rep Coin | |
Defined in Shelley.Spec.Ledger.Coin type Rep Coin = D1 ('MetaData "Coin" "Shelley.Spec.Ledger.Coin" "shelley-spec-ledger-0.1.0.0-7440b22137bfc140a8cd17b660ea67aa62feb06158c7e9041ba5ff367237ec16" 'True) (C1 ('MetaCons "Coin" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCoin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))) | |
| newtype CompactForm Coin | |
Defined in Shelley.Spec.Ledger.Coin | |
| type Delta Coin | |
Defined in Shelley.Spec.Ledger.Coin type Delta Coin = DeltaCoin | |
Constructors
| EpochSize | |
Fields | |
Instances
| Enum EpochSize | |
Defined in Cardano.Slotting.Slot | |
| Eq EpochSize | |
| Integral EpochSize | |
Defined in Cardano.Slotting.Slot | |
| Num EpochSize | |
| Ord EpochSize | |
Defined in Cardano.Slotting.Slot | |
| Real EpochSize | |
Defined in Cardano.Slotting.Slot Methods toRational ∷ EpochSize → Rational # | |
| Show EpochSize | |
| Generic EpochSize | |
| NoThunks EpochSize | |
| FromJSON EpochSize | |
Defined in Cardano.Slotting.Slot | |
| ToJSON EpochSize | |
Defined in Cardano.Slotting.Slot Methods toEncoding ∷ EpochSize → Encoding # toJSONList ∷ [EpochSize] → Value # toEncodingList ∷ [EpochSize] → Encoding # | |
| type Rep EpochSize | |
Defined in Cardano.Slotting.Slot type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-e2258fd540e9b0f326f2acf99f1179af359b3cd0d4a73c3fbc72c8d4df62554a" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |
data GenDelegPair crypto #
Constructors
| GenDelegPair | |
Fields
| |
Instances
Constructors
| Genesis | |
| GenesisDelegate | |
| Payment | |
| Staking | |
| StakePool | |
| BlockIssuer | |
| Witness |
newtype KeyHash (discriminator ∷ KeyRole) crypto #
Constructors
| KeyHash (Hash (ADDRHASH crypto) (VerKeyDSIGN (DSIGN crypto))) |
Instances
| HasKeyRole KeyHash | |
Defined in Shelley.Spec.Ledger.Keys Methods coerceKeyRole ∷ ∀ (r ∷ KeyRole) crypto (r' ∷ KeyRole). KeyHash r crypto → KeyHash r' crypto | |
| Embed (PoolDistr crypto) (Map (KeyHash 'StakePool crypto) (IndividualPoolStake crypto)) | |
| HasExp (PoolDistr crypto) (Map (KeyHash 'StakePool crypto) (IndividualPoolStake crypto)) | |
Defined in Shelley.Spec.Ledger.Delegation.Certificates | |
| Eq (KeyHash discriminator crypto) | |
| Ord (KeyHash discriminator crypto) | |
Defined in Shelley.Spec.Ledger.Keys Methods compare ∷ KeyHash discriminator crypto → KeyHash discriminator crypto → Ordering # (<) ∷ KeyHash discriminator crypto → KeyHash discriminator crypto → Bool # (<=) ∷ KeyHash discriminator crypto → KeyHash discriminator crypto → Bool # (>) ∷ KeyHash discriminator crypto → KeyHash discriminator crypto → Bool # (>=) ∷ KeyHash discriminator crypto → KeyHash discriminator crypto → Bool # max ∷ KeyHash discriminator crypto → KeyHash discriminator crypto → KeyHash discriminator crypto # min ∷ KeyHash discriminator crypto → KeyHash discriminator crypto → KeyHash discriminator crypto # | |
| Show (KeyHash discriminator crypto) | |
| Generic (KeyHash discriminator crypto) | |
| NFData (KeyHash discriminator crypto) | |
Defined in Shelley.Spec.Ledger.Keys | |
| NoThunks (KeyHash discriminator crypto) | |
| (Crypto crypto, Typeable disc) ⇒ FromCBOR (KeyHash disc crypto) | |
| (Crypto crypto, Typeable disc) ⇒ ToCBOR (KeyHash disc crypto) | |
| Crypto crypto ⇒ FromJSON (KeyHash disc crypto) | |
Defined in Shelley.Spec.Ledger.Keys | |
| ToJSON (KeyHash disc crypto) | |
Defined in Shelley.Spec.Ledger.Keys Methods toJSON ∷ KeyHash disc crypto → Value # toEncoding ∷ KeyHash disc crypto → Encoding # toJSONList ∷ [KeyHash disc crypto] → Value # toEncodingList ∷ [KeyHash disc crypto] → Encoding # | |
| Crypto crypto ⇒ FromJSONKey (KeyHash disc crypto) | |
Defined in Shelley.Spec.Ledger.Keys Methods fromJSONKey ∷ FromJSONKeyFunction (KeyHash disc crypto) fromJSONKeyList ∷ FromJSONKeyFunction [KeyHash disc crypto] | |
| ToJSONKey (KeyHash disc crypto) | |
Defined in Shelley.Spec.Ledger.Keys Methods toJSONKey ∷ ToJSONKeyFunction (KeyHash disc crypto) toJSONKeyList ∷ ToJSONKeyFunction [KeyHash disc crypto] | |
| type Rep (KeyHash discriminator crypto) | |
Defined in Shelley.Spec.Ledger.Keys | |
data PParams' (f ∷ Type → Type) era #
Constructors
| PParams | |
Fields
| |
Instances
type PParamsUpdate era = PParams' StrictMaybe era #
type StandardShelley = ShelleyEra StandardCrypto #
type StandardAllegra = AllegraEra StandardCrypto #
type StandardMary = MaryEra StandardCrypto #
emptyPParams ∷ PParams era #
truncateUnitInterval ∷ Ratio Word64 → UnitInterval #
emptyGenesisStaking ∷ ShelleyGenesisStaking crypto #